Skip to content

Commit 8daad34

Browse files
committed
ci: fix more runs-on
1 parent c27b4e9 commit 8daad34

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ on:
2929
required: false
3030
type: string
3131
default: '{"runner": ["ubuntu-latest", "ubuntu-24.04-arm"]}'
32-
default-runner-labels:
32+
runner-labels:
3333
description: >-
3434
Single runner label OR JSON array of runner labels for non-build jobs.
3535
Examples:
3636
ubuntu-latest
37-
["ubuntu-latest"]
38-
["self-hosted", "linux", "x86_64"]
37+
'["ubuntu-latest"]'
38+
'["self-hosted", "linux", "x86_64"]'
3939
Provide a valid JSON array (starting with '[') to use multiple labels; any other value is treated as a single label string.
4040
required: false
4141
type: string
@@ -45,7 +45,7 @@ on:
4545
description: "User name for Docker login, if not provided the GitHub actor will be used"
4646
required: false
4747
DOCKER_REGISTRY_PASSWORD:
48-
description: "Password or token for Docker login, if not provided the GITHUB_TOKEN will be used"
48+
description: "Password or token for Docker login, if not provided the GitHub token will be used"
4949
required: false
5050

5151
permissions: {}
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
image-name: ${{ inputs.image-name }}
5858
registry: ${{ inputs.registry }}
59-
runner-labels: ${{ inputs.default-runner-labels }}
59+
runner-labels: ${{ inputs.runner-labels }}
6060

6161
build-push:
6262
strategy:
@@ -78,7 +78,7 @@ jobs:
7878
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
7979
env:
8080
USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME || github.actor }}
81-
PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
81+
PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || github.token }}
8282
with:
8383
registry: ${{ inputs.registry }}
8484
username: ${{ env.USERNAME }}
@@ -140,7 +140,7 @@ jobs:
140140
merge-image:
141141
# Support either a plain single label (e.g. ubuntu-latest) OR a JSON array of labels.
142142
# If the input starts & ends with brackets we attempt JSON parsing; otherwise we pass the raw string.
143-
runs-on: ${{ (startsWith(inputs.default-runner-labels, '[') && endsWith(inputs.default-runner-labels, ']')) && fromJson(inputs.default-runner-labels) || inputs.default-runner-labels }}
143+
runs-on: ${{ (startsWith(inputs.runner-labels, '[') && endsWith(inputs.runner-labels, ']')) && fromJson(inputs.runner-labels) || inputs.runner-labels }}
144144
needs:
145145
- build-push
146146
- sanitize-image-name
@@ -170,7 +170,7 @@ jobs:
170170
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
171171
env:
172172
USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME || github.actor }}
173-
PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
173+
PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || github.token }}
174174
with:
175175
registry: ${{ inputs.registry }}
176176
username: ${{ env.USERNAME }}

.github/workflows/wc-dependency-review.yml

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

1515
jobs:
1616
dependency-review:
17-
runs-on: ${{ inputs.runner-labels }}
17+
runs-on: ${{ (startsWith(inputs.runner-labels, '[') && endsWith(inputs.runner-labels, ']')) && fromJson(inputs.runner-labels) || inputs.runner-labels }}
1818
permissions:
1919
contents: read
2020
pull-requests: write

.github/workflows/wc-integration-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runner-labels: ${{ inputs.runner-labels }}
3737

3838
determine-container:
39-
runs-on: ${{ fromJson(inputs.runner-labels) }}
39+
runs-on: ${{ (startsWith(inputs.runner-labels, '[') && endsWith(inputs.runner-labels, ']')) && fromJson(inputs.runner-labels) || inputs.runner-labels }}
4040
needs: sanitize-image-name
4141
outputs:
4242
container: ${{ steps.set-container.outputs.container }}
@@ -63,7 +63,7 @@ jobs:
6363
needs:
6464
- determine-container
6565
- sanitize-image-name
66-
runs-on: ${{ fromJson(inputs.runner-labels) }}
66+
runs-on: ${{ (startsWith(inputs.runner-labels, '[') && endsWith(inputs.runner-labels, ']')) && fromJson(inputs.runner-labels) || inputs.runner-labels }}
6767
container:
6868
image: ${{ needs.determine-container.outputs.container }}
6969
credentials:

0 commit comments

Comments
 (0)