@@ -489,7 +489,11 @@ export async function loadUserConfig(
489489 apiDetails : api . GitHubApiCombinedDetails ,
490490 tempDir : string ,
491491) : Promise < UserConfig > {
492- if ( isLocal ( configFile ) ) {
492+ const allowNewFormat = await actionState . features . getValue (
493+ Feature . NewRemoteFileAddresses ,
494+ ) ;
495+
496+ if ( isLocal ( configFile , allowNewFormat ) ) {
493497 if ( configFile !== userConfigFromActionPath ( tempDir ) ) {
494498 // If the config file is not generated by the Action, it should be relative to the workspace.
495499 configFile = path . resolve ( workspacePath , configFile ) ;
@@ -508,7 +512,7 @@ export async function loadUserConfig(
508512 // Drop the explicit prefix if it is present. Since `REMOTE_PATH_PREFIX` is chosen
509513 // to not conflict with permissible characters in "owner" or "repo" components,
510514 // this does not risk removing valid parts of either component by accident.
511- if ( isExplicitRemotePath ( configFile ) ) {
515+ if ( allowNewFormat && isExplicitRemotePath ( configFile ) ) {
512516 configFile = configFile . substring ( REMOTE_PATH_PREFIX . length ) ;
513517 }
514518 return await getRemoteConfig ( actionState , configFile , apiDetails ) ;
@@ -1322,7 +1326,7 @@ function containsAtRef(configPath: string): boolean {
13221326 * @param configPath The path to test.
13231327 * @returns True if it is local, or false otherwise.
13241328 */
1325- function isLocal ( configPath : string ) : boolean {
1329+ function isLocal ( configPath : string , allowNewFormat : boolean ) : boolean {
13261330 // If the path starts with `LOCAL_PATH_PREFIX`, it is explicitly local.
13271331 // This allows local paths that would otherwise contain '@'
13281332 // to be used with a `LOCAL_PATH_PREFIX` prefix.
@@ -1331,7 +1335,7 @@ function isLocal(configPath: string): boolean {
13311335 }
13321336 // If the path starts with `REMOTE_PATH_PREFIX`, it is explicitly remote.
13331337 // This allows users to resolve ambiguity by specifying `REMOTE_PATH_PREFIX`.
1334- if ( isExplicitRemotePath ( configPath ) ) {
1338+ if ( allowNewFormat && isExplicitRemotePath ( configPath ) ) {
13351339 return false ;
13361340 }
13371341
0 commit comments