Skip to content

Commit e664963

Browse files
authored
feat: add OVERRIDE_RUNS_ON variables to control runners per repository (#228)
* feat: add OVERRIDE_RUNS_ON variables to control runners per repository * Add more overrides
1 parent 99f80cd commit e664963

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

.github/workflows/build-docker-artifacts-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ permissions:
4242
jobs:
4343
post-build:
4444
name: Push ${{ inputs.repository }}:${{ inputs.image_tag }} docker artifacts to ${{ inputs.customer }}
45-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
45+
runs-on: ${{ vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
4646

4747
steps:
4848
- name: Checkout repository (must be run in infrastructure-k8s)

.github/workflows/build-docker-artifacts-trigger-push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ permissions:
3737
jobs:
3838
get-customers:
3939
name: Get customers to push to (${{ inputs.push_to || 'all' }})
40-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
40+
runs-on: ${{ vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
4141
outputs:
4242
result: ${{ steps.get-customers.outputs.result }}
4343

@@ -96,7 +96,7 @@ jobs:
9696
fail-fast: true
9797
matrix:
9898
customer: ${{ fromJson(needs.get-customers.outputs.result) }}
99-
runs-on: ${{ inputs.runs_on }}
99+
runs-on: ${{ vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
100100
steps:
101101
- name: Trigger push docker artifacts to ${{ matrix.customer.customer }}
102102
if: ${{ matrix.customer.customer_json.skip != true }}

.github/workflows/build-docker-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
fail-fast: ${{ inputs.fail_fast }}
154154
matrix:
155155
component: ${{ fromJson(needs.get-flavors.outputs.result).components }}
156-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
156+
runs-on: ${{ vars.BUILD_DOCKER_ARTIFACTS_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
157157
steps:
158158
- name: View flavor and component
159159
shell: bash

.github/workflows/build-node-python.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
permissions:
140140
id-token: write
141141
contents: write
142-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
142+
runs-on: ${{ vars.BUILD_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
143143
steps:
144144
- name: Checkout source repository
145145
uses: actions/checkout@v5
@@ -182,7 +182,7 @@ jobs:
182182
permissions:
183183
id-token: write
184184
contents: write
185-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
185+
runs-on: ${{ vars.BUILD_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
186186
steps:
187187
- name: Checkout source repository
188188
uses: actions/checkout@v5
@@ -221,7 +221,7 @@ jobs:
221221
permissions:
222222
id-token: write
223223
contents: write
224-
runs-on: ${{ inputs.cypress_runs_on || inputs.runs_on || 'ubuntu-22.04-large' }}
224+
runs-on: ${{ vars.CYPRESS_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.cypress_runs_on || inputs.runs_on || 'ubuntu-22.04-large' }}
225225

226226
services:
227227
postgres:
@@ -362,7 +362,7 @@ jobs:
362362
permissions:
363363
id-token: write
364364
contents: write
365-
runs-on: ${{ inputs.playwright_runs_on || inputs.runs_on || 'ubuntu-22.04-large' }}
365+
runs-on: ${{ vars.PLAYWRIGHT_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.playwright_runs_on || inputs.runs_on || 'ubuntu-22.04-large' }}
366366

367367
services:
368368
postgres:

.github/workflows/build-node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
permissions:
5555
id-token: write
5656
contents: write
57-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
57+
runs-on: ${{ vars.BUILD_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
5858
steps:
5959
- name: Checkout source repository
6060
uses: actions/checkout@v5

.github/workflows/build-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
permissions:
4444
id-token: write
4545
contents: write
46-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
46+
runs-on: ${{ vars.BUILD_RUNS_ON_OVERRIDE || vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
4747
steps:
4848
- name: Checkout source repository
4949
uses: actions/checkout@v5

.github/workflows/build-single-product-part.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ permissions:
6666
jobs:
6767
build-components:
6868
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
69-
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
69+
runs-on: ${{ vars.RUNS_ON_OVERRIDE || inputs.runs_on || 'ubuntu-22.04' }}
7070
steps:
7171
- name: Remove unnecessary files
7272
run: |

0 commit comments

Comments
 (0)