Skip to content

Commit c991c9b

Browse files
committed
remove runs-on input to avoid running builds on
Signed-off-by: CrazyMax <[email protected]>
1 parent 4f713f3 commit c991c9b

File tree

3 files changed

+11
-31
lines changed

3 files changed

+11
-31
lines changed

.github/workflows/bake.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: bake
33
on:
44
workflow_call:
55
inputs:
6-
runs-on:
7-
type: string
8-
description: "Type of machine to run the jobs on similar to jobs.<job_id>.runs-on (defaults to best matching runner depending on target platform)"
9-
required: false
106
context:
117
type: string
128
description: "Context to build from (defaults to repository root)"
@@ -145,7 +141,7 @@ env:
145141

146142
jobs:
147143
prepare:
148-
runs-on: ${{ inputs.runs-on || 'ubuntu-latest' }}
144+
runs-on: ubuntu-24.04
149145
permissions:
150146
contents: read
151147
outputs:
@@ -177,7 +173,6 @@ jobs:
177173
uses: actions/github-script@v8
178174
env:
179175
INPUT_MATRIX-SIZE-LIMIT: ${{ env.MATRIX_SIZE_LIMIT }}
180-
INPUT_RUNS-ON: ${{ inputs.runs-on }}
181176
INPUT_CONTEXT: ${{ inputs.context }}
182177
INPUT_TARGET: ${{ inputs.target }}
183178
INPUT_BAKE-ALLOW: ${{ inputs.bake-allow }}
@@ -194,7 +189,6 @@ jobs:
194189
195190
const inpMatrixSizeLimit = parseInt(core.getInput('matrix-size-limit'), 10);
196191
197-
const inpRunsOn = core.getInput('runs-on');
198192
const inpContext = core.getInput('context');
199193
const inpTarget = core.getInput('target');
200194
const inpBakeAllow = core.getInput('bake-allow');
@@ -240,18 +234,14 @@ jobs:
240234
} else if (platforms.length === 0) {
241235
includes.push({
242236
index: 0,
243-
'runs-on': inpRunsOn || 'ubuntu-latest'
237+
runner: 'ubuntu-24.04'
244238
});
245239
} else {
246240
platforms.forEach((platform, index) => {
247-
let runsOn = inpRunsOn;
248-
if (!runsOn) {
249-
runsOn = platform.startsWith('linux/arm') ? 'ubuntu-24.04-arm' : 'ubuntu-latest';
250-
}
251241
includes.push({
252242
index: index,
253243
platform: platform,
254-
'runs-on': runsOn
244+
runner: platform.startsWith('linux/arm') ? 'ubuntu-24.04-arm' : 'ubuntu-24.04'
255245
});
256246
});
257247
}
@@ -260,7 +250,7 @@ jobs:
260250
});
261251
262252
build:
263-
runs-on: ${{ matrix.runs-on }}
253+
runs-on: ${{ matrix.runner }}
264254
needs:
265255
- prepare
266256
permissions:
@@ -633,7 +623,7 @@ jobs:
633623
core.setOutput(`result_${inpIndex}`, JSON.stringify(result));
634624
635625
finalize:
636-
runs-on: ${{ inputs.runs-on || 'ubuntu-latest' }}
626+
runs-on: ubuntu-24.04
637627
permissions:
638628
contents: read
639629
id-token: write # for registry authentication with OIDC if needed

.github/workflows/build.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: build
33
on:
44
workflow_call:
55
inputs:
6-
runs-on:
7-
type: string
8-
description: "Type of machine to run the jobs on similar to jobs.<job_id>.runs-on (defaults to best matching runner depending on target platform)"
9-
required: false
106
context:
117
type: string
128
description: "Context to build from (defaults to repository root)"
@@ -156,7 +152,7 @@ env:
156152

157153
jobs:
158154
prepare:
159-
runs-on: ${{ inputs.runs-on || 'ubuntu-latest' }}
155+
runs-on: ubuntu-24.04
160156
permissions:
161157
contents: read
162158
outputs:
@@ -176,15 +172,13 @@ jobs:
176172
uses: actions/github-script@v8
177173
env:
178174
INPUT_MATRIX-SIZE-LIMIT: ${{ env.MATRIX_SIZE_LIMIT }}
179-
INPUT_RUNS-ON: ${{ inputs.runs-on }}
180175
INPUT_BUILD-PLATFORMS: ${{ inputs.build-platforms }}
181176
with:
182177
script: |
183178
const { Util } = require('@docker/actions-toolkit/lib/util');
184179
185180
const inpMatrixSizeLimit = parseInt(core.getInput('matrix-size-limit'), 10);
186181
187-
const inpRunsOn = core.getInput('runs-on');
188182
const inpBuildPlatforms = Util.getInputList('build-platforms');
189183
190184
await core.group(`Set includes`, async () => {
@@ -194,18 +188,14 @@ jobs:
194188
} else if (inpBuildPlatforms.length === 0) {
195189
includes.push({
196190
index: 0,
197-
'runs-on': inpRunsOn || 'ubuntu-latest'
191+
runner: 'ubuntu-24.04'
198192
});
199193
} else {
200194
inpBuildPlatforms.forEach((platform, index) => {
201-
let runsOn = inpRunsOn;
202-
if (!runsOn) {
203-
runsOn = platform.startsWith('linux/arm') ? 'ubuntu-24.04-arm' : 'ubuntu-latest';
204-
}
205195
includes.push({
206196
index: index,
207197
platform: platform,
208-
'runs-on': runsOn
198+
runner: platform.startsWith('linux/arm') ? 'ubuntu-24.04-arm' : 'ubuntu-24.04'
209199
});
210200
});
211201
}
@@ -214,7 +204,7 @@ jobs:
214204
});
215205
216206
build:
217-
runs-on: ${{ matrix.runs-on }}
207+
runs-on: ${{ matrix.runner }}
218208
needs:
219209
- prepare
220210
permissions:
@@ -524,7 +514,7 @@ jobs:
524514
core.setOutput(`result_${inpIndex}`, JSON.stringify(result));
525515
526516
finalize:
527-
runs-on: ${{ inputs.runs-on || 'ubuntu-latest' }}
517+
runs-on: ubuntu-24.04
528518
permissions:
529519
contents: read
530520
id-token: write # for registry authentication with OIDC if needed

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
verify:
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04
1818
steps:
1919
-
2020
name: Extract builder outputs

0 commit comments

Comments
 (0)