Skip to content

Commit 8cb7c5b

Browse files
committed
Make runner an input
1 parent 7ca4a8d commit 8cb7c5b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
required: false
1818
type: boolean
1919
default: false
20+
runner:
21+
required: false
22+
type: string
23+
default: 'ubuntu-24.04'
2024

2125
defaults:
2226
run:
@@ -32,7 +36,7 @@ jobs:
3236
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
3337
packages: write # for docker/build-push-action to push to GHCR
3438
id-token: write # for docker/login to login to NGINX registry
35-
runs-on: ${{ github.repository_owner == 'nginx' && (inputs.tag != '' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
39+
runs-on: ${{ inputs.runner }}
3640
services:
3741
registry:
3842
image: registry:3

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ jobs:
223223
platforms: ${{ matrix.platforms }}
224224
tag: ${{ inputs.release_version || '' }}
225225
dry_run: ${{ inputs.dry_run || false}}
226+
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
226227
permissions:
227228
contents: read # for docker/build-push-action to read repo content
228229
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
@@ -239,6 +240,7 @@ jobs:
239240
platforms: "linux/arm64, linux/amd64"
240241
tag: ${{ inputs.release_version || '' }}
241242
dry_run: ${{ inputs.dry_run || false }}
243+
runner: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
242244
permissions:
243245
contents: read # for docker/build-push-action to read repo content
244246
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results

0 commit comments

Comments
 (0)