Skip to content

Commit b5a80b6

Browse files
committed
chore: make runner labels configurable
1 parent 9894163 commit b5a80b6

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/wc-build-push.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ on:
1212
required: false
1313
type: string
1414
default: "ghcr.io"
15+
build-matrix:
16+
description: >-
17+
JSON object passed to fromJson to become the build matrix. Example:
18+
{"runner": ["ubuntu-latest", "ubuntu-24.04-arm"]}
19+
Must include at least a key 'runner' listing GitHub runner labels.
20+
required: false
21+
type: string
22+
default: '{"runner": ["ubuntu-latest", "ubuntu-24.04-arm"]}'
23+
merge-runner:
24+
description: "Runner label for the merge-image job"
25+
required: false
26+
type: string
27+
default: ubuntu-latest
1528
secrets:
1629
DOCKER_USERNAME:
1730
description: "User name for Docker login, if not provided the GitHub actor will be used"
@@ -30,8 +43,7 @@ env:
3043
jobs:
3144
build-push:
3245
strategy:
33-
matrix:
34-
runner: ["ubuntu-latest", "ubuntu-24.04-arm"]
46+
matrix: ${{ fromJson(inputs.build-matrix) }}
3547
runs-on: ${{ matrix.runner }}
3648
permissions:
3749
packages: write
@@ -96,7 +108,7 @@ jobs:
96108
retention-days: 1
97109

98110
merge-image:
99-
runs-on: ubuntu-latest
111+
runs-on: ${{ inputs.merge-runner }}
100112
needs: build-push
101113
permissions:
102114
actions: read

0 commit comments

Comments
 (0)