|
29 | 29 | required: false |
30 | 30 | type: string |
31 | 31 | default: '{"runner": ["ubuntu-latest", "ubuntu-24.04-arm"]}' |
32 | | - default-runner-labels: |
| 32 | + runner-labels: |
33 | 33 | description: >- |
34 | 34 | Single runner label OR JSON array of runner labels for non-build jobs. |
35 | 35 | Examples: |
36 | 36 | ubuntu-latest |
37 | | - ["ubuntu-latest"] |
38 | | - ["self-hosted", "linux", "x86_64"] |
| 37 | + '["ubuntu-latest"]' |
| 38 | + '["self-hosted", "linux", "x86_64"]' |
39 | 39 | Provide a valid JSON array (starting with '[') to use multiple labels; any other value is treated as a single label string. |
40 | 40 | required: false |
41 | 41 | type: string |
|
45 | 45 | description: "User name for Docker login, if not provided the GitHub actor will be used" |
46 | 46 | required: false |
47 | 47 | 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" |
49 | 49 | required: false |
50 | 50 |
|
51 | 51 | permissions: {} |
|
56 | 56 | with: |
57 | 57 | image-name: ${{ inputs.image-name }} |
58 | 58 | registry: ${{ inputs.registry }} |
59 | | - runner-labels: ${{ inputs.default-runner-labels }} |
| 59 | + runner-labels: ${{ inputs.runner-labels }} |
60 | 60 |
|
61 | 61 | build-push: |
62 | 62 | strategy: |
|
78 | 78 | - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 |
79 | 79 | env: |
80 | 80 | USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME || github.actor }} |
81 | | - PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} |
| 81 | + PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || github.token }} |
82 | 82 | with: |
83 | 83 | registry: ${{ inputs.registry }} |
84 | 84 | username: ${{ env.USERNAME }} |
@@ -140,7 +140,7 @@ jobs: |
140 | 140 | merge-image: |
141 | 141 | # Support either a plain single label (e.g. ubuntu-latest) OR a JSON array of labels. |
142 | 142 | # 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 }} |
144 | 144 | needs: |
145 | 145 | - build-push |
146 | 146 | - sanitize-image-name |
@@ -170,7 +170,7 @@ jobs: |
170 | 170 | - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 |
171 | 171 | env: |
172 | 172 | USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME || github.actor }} |
173 | | - PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} |
| 173 | + PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD || github.token }} |
174 | 174 | with: |
175 | 175 | registry: ${{ inputs.registry }} |
176 | 176 | username: ${{ env.USERNAME }} |
|
0 commit comments