@@ -89,33 +89,6 @@ export async function pullRunnerImage(
8989) : Promise < string > {
9090 const d = initDocker ( ) ;
9191 const platform = `linux/${ architecture } ` ;
92-
93- const splitImageRef = ( ref : string ) : { repo : string ; tag : string } => {
94- const lastColon = ref . lastIndexOf ( ':' ) ;
95- const lastSlash = ref . lastIndexOf ( '/' ) ;
96- if ( lastColon > lastSlash ) {
97- return { repo : ref . slice ( 0 , lastColon ) , tag : ref . slice ( lastColon + 1 ) } ;
98- }
99- return { repo : ref , tag : 'latest' } ;
100- } ;
101-
102- const { repo, tag : originalTag } = splitImageRef ( RUNNER_IMAGE ) ;
103- const archTag = `${ originalTag } -${ architecture } ` ;
104- const platformTag = `${ repo } :${ archTag } ` ;
105-
106- // Check if we already have the platform-specific tag with correct architecture
107- try {
108- const existingImage = await d . getImage ( platformTag ) . inspect ( ) ;
109- const imageArch = normalizeImageArchitecture ( existingImage . Architecture ) ;
110-
111- if ( imageArch === architecture ) {
112- console . log ( `Image ${ platformTag } already exists with correct architecture (${ existingImage . Architecture } )` ) ;
113- return platformTag ;
114- }
115- console . log ( `Image ${ platformTag } exists but has wrong architecture (${ existingImage . Architecture } ), re-pulling...` ) ;
116- } catch {
117- // Image doesn't exist, need to pull
118- }
11992
12093 console . log ( `Pulling image ${ RUNNER_IMAGE } for ${ platform } ...` ) ;
12194
@@ -140,23 +113,8 @@ export async function pullRunnerImage(
140113 } ) ;
141114 } ) ;
142115 } ) ;
143-
144- // Verify the pulled image has the correct architecture
145- const pulledImage = await d . getImage ( RUNNER_IMAGE ) . inspect ( ) ;
146- console . log ( `Pulled image architecture: ${ pulledImage . Architecture } ` ) ;
147- assertImageArchitecture ( RUNNER_IMAGE , pulledImage . Architecture , architecture ) ;
148-
149- // Tag the pulled image with architecture-specific tag
150- console . log ( `Tagging image as ${ platformTag } ...` ) ;
151- const image = d . getImage ( RUNNER_IMAGE ) ;
152- await image . tag ( { repo, tag : archTag } ) ;
153-
154- // Verify the tagged image
155- const taggedImage = await d . getImage ( platformTag ) . inspect ( ) ;
156- console . log ( `Tagged image ${ platformTag } architecture: ${ taggedImage . Architecture } ` ) ;
157- assertImageArchitecture ( platformTag , taggedImage . Architecture , architecture ) ;
158-
159- return platformTag ;
116+
117+ return RUNNER_IMAGE ;
160118}
161119
162120/**
0 commit comments