@@ -3,11 +3,10 @@ name: bake
33on :
44 workflow_call :
55 inputs :
6- runner :
6+ runs-on :
77 type : string
8- description : " Runner instance "
8+ description : " Type of machine to run the jobs on similar to jobs.<job_id>.runs-on "
99 required : false
10- default : ' auto'
1110 context :
1211 type : string
1312 description : " Context to build from, defaults to repository root"
@@ -135,11 +134,11 @@ env:
135134 DOCKER_ACTIONS_TOOLKIT_MODULE : " @docker/actions-toolkit@0.67.0"
136135 COSIGN_VERSION : " v3.0.2"
137136 LOCAL_EXPORT_DIR : " /tmp/buildx-output"
138- MATRIX_SIZE_LIMIT : 20
137+ MATRIX_SIZE_LIMIT : " 20 "
139138
140139jobs :
141140 prepare :
142- runs-on : ${{ inputs.runner == 'auto' && ' ubuntu-latest' || inputs.runner }}
141+ runs-on : ${{ inputs.runs-on || ' ubuntu-latest' }}
143142 outputs :
144143 includes : ${{ steps.set.outputs.includes }}
145144 steps :
@@ -169,7 +168,7 @@ jobs:
169168 uses : actions/github-script@v8
170169 env :
171170 INPUT_MATRIX-SIZE-LIMIT : ${{ env.MATRIX_SIZE_LIMIT }}
172- INPUT_RUNNER : ${{ inputs.runner }}
171+ INPUT_RUNS-ON : ${{ inputs.runs-on || 'ubuntu-latest' }}
173172 INPUT_CONTEXT : ${{ inputs.context }}
174173 INPUT_TARGET : ${{ inputs.target }}
175174 INPUT_BAKE-ALLOW : ${{ inputs.bake-allow }}
@@ -185,8 +184,8 @@ jobs:
185184 const { Util } = require('@docker/actions-toolkit/lib/util');
186185
187186 const inpMatrixSizeLimit = parseInt(core.getInput('matrix-size-limit'), 10);
188-
189- const inpRunner = core.getInput('runner ');
187+
188+ const inpRunsOn = core.getInput('runs-on ');
190189 const inpContext = core.getInput('context');
191190 const inpTarget = core.getInput('target');
192191 const inpBakeAllow = core.getInput('bake-allow');
@@ -232,18 +231,18 @@ jobs:
232231 } else if (platforms.length === 0) {
233232 includes.push({
234233 index: 0,
235- runner: inpRunner === 'auto' ? 'ubuntu-latest' : inpRunner
234+ 'runs-on': inpRunsOn
236235 });
237236 } else {
238237 platforms.forEach((platform, index) => {
239- let runner = inpRunner ;
240- if (runner === 'auto' ) {
241- runner = platform.startsWith('linux/arm') ? 'ubuntu-24.04-arm' : 'ubuntu-latest';
238+ let runsOn = inpRunsOn ;
239+ if (!runsOn ) {
240+ runsOn = platform.startsWith('linux/arm') ? 'ubuntu-24.04-arm' : 'ubuntu-latest';
242241 }
243242 includes.push({
244243 index: index,
245244 platform: platform,
246- runner: runner
245+ 'runs-on': runsOn
247246 });
248247 });
249248 }
@@ -252,7 +251,7 @@ jobs:
252251 });
253252
254253 build :
255- runs-on : ${{ matrix.runner }}
254+ runs-on : ${{ matrix.runs-on }}
256255 needs :
257256 - prepare
258257 permissions :
@@ -626,7 +625,7 @@ jobs:
626625 core.setOutput(`result_${inpIndex}`, JSON.stringify(result));
627626
628627 post :
629- runs-on : ubuntu-latest
628+ runs-on : ${{ inputs.runs-on || ' ubuntu-latest' }}
630629 outputs :
631630 cosign-version : ${{ env.COSIGN_VERSION }}
632631 cosign-verify-commands : ${{ steps.set.outputs.cosign-verify-commands }}
0 commit comments