Skip to content

Commit f0389eb

Browse files
committed
feat: allow custom runner configuration in most workflows
1 parent 5feca81 commit f0389eb

File tree

10 files changed

+61
-11
lines changed

10 files changed

+61
-11
lines changed

.github/workflows/go-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ on:
1515
env:
1616
required: false
1717
type: string
18+
runner:
19+
required: false
20+
type: string
21+
default: '"ubuntu-latest"'
1822
secrets:
1923
CHECKOUT_TOKEN:
2024
required: false
2125

2226
jobs:
2327
unit:
24-
runs-on: ubuntu-latest
28+
runs-on: ${{ fromJSON(vars['UCI_GO_CHECK_RUNNER'] || inputs['runner']) }}
2529
name: All
2630
steps:
2731
- name: Set env

.github/workflows/go-test.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ on:
1313
env:
1414
required: false
1515
type: string
16+
runner-ubuntu:
17+
required: false
18+
type: string
19+
default: '"ubuntu-latest"'
20+
runner-windows:
21+
required: false
22+
type: string
23+
default: '"windows-latest"'
24+
runner-macos:
25+
required: false
26+
type: string
27+
default: '"macos-latest"'
1628
secrets:
1729
CODECOV_TOKEN:
1830
required: false
@@ -34,7 +46,7 @@ jobs:
3446
GOTESTFLAGS: -cover -coverprofile=module-coverage.txt -coverpkg=./...
3547
GO386FLAGS: ''
3648
GORACEFLAGS: ''
37-
runs-on: ${{ fromJSON(vars[format('UCI_GO_TEST_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }}
49+
runs-on: ${{ fromJSON(vars[format('UCI_GO_TEST_RUNNER_{0}', matrix.os)] || inputs[format('runner-{0}', matrix.os)]) }}
3850
name: ${{ matrix.os }} (go ${{ matrix.go }})
3951
steps:
4052
- name: Set env

.github/workflows/release-check.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ on:
1414
required: false
1515
type: string
1616
default: '/'
17+
runner:
18+
required: false
19+
type: string
20+
default: '"ubuntu-latest"'
1721
outputs:
1822
json:
1923
description: JSON aggregation of release.json artifacts
2024
value: ${{ jobs.aggregate.outputs.json }}
2125

2226
jobs:
2327
release-check:
24-
runs-on: ubuntu-latest
28+
runs-on: ${{ fromJSON(vars['UCI_RELEASE_CHECK_RUNNER'] || inputs['runner']) }}
2529
strategy:
2630
fail-fast: false
2731
matrix:
@@ -338,7 +342,7 @@ jobs:
338342
path: release.json
339343
aggregate:
340344
needs: [release-check]
341-
runs-on: ubuntu-latest
345+
runs-on: ${{ fromJSON(vars['UCI_RELEASE_CHECK_RUNNER'] || inputs['runner']) }}
342346
outputs:
343347
json: ${{ toJSON(fromJSON(steps.aggregate.outputs.json)) }}
344348
steps:

.github/workflows/releaser.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
required: false
1919
type: boolean
2020
default: false
21+
runner:
22+
required: false
23+
type: string
24+
default: '"ubuntu-latest"'
2125
outputs:
2226
json:
2327
description: JSON aggregation of release.json artifacts
@@ -28,7 +32,7 @@ on:
2832

2933
jobs:
3034
releaser:
31-
runs-on: ubuntu-latest
35+
runs-on: ${{ fromJSON(vars['UCI_RELEASER_RUNNER'] || inputs['runner']) }}
3236
strategy:
3337
fail-fast: false
3438
matrix:
@@ -185,7 +189,7 @@ jobs:
185189
overwrite: true
186190
aggregate:
187191
needs: [releaser]
188-
runs-on: ubuntu-latest
192+
runs-on: ${{ fromJSON(vars['UCI_RELEASER_RUNNER'] || inputs['runner']) }}
189193
outputs:
190194
json: ${{ toJSON(fromJSON(steps.aggregate.outputs.json)) }}
191195
steps:

.github/workflows/reusable-generated-pr.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Close Generated PRs
22

33
on:
44
workflow_call:
5+
inputs:
6+
runner:
7+
required: false
8+
type: string
9+
default: '"ubuntu-latest"'
510

611
jobs:
712
stale:
8-
runs-on: ubuntu-latest
13+
runs-on: ${{ fromJSON(vars['UCI_GENERATED_PR_RUNNER'] || inputs['runner']) }}
914
permissions:
1015
issues: write
1116
pull-requests: write

.github/workflows/reusable-semantic-pull-request.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ name: Semantic PR
22

33
on:
44
workflow_call:
5+
inputs:
6+
runner:
7+
required: false
8+
type: string
9+
default: '"ubuntu-latest"'
510

611
jobs:
712
main:
813
name: Validate PR title
9-
runs-on: ubuntu-latest
14+
runs-on: ${{ fromJSON(vars['UCI_SEMANTIC_PULL_REQUEST_RUNNER'] || inputs['runner']) }}
1015
steps:
1116
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
1217
env:

.github/workflows/reusable-spellcheck.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Check Spelling
22

33
on:
44
workflow_call:
5+
inputs:
6+
runner:
7+
required: false
8+
type: string
9+
default: '"ubuntu-latest"'
510

611
jobs:
712
spellcheck:
8-
runs-on: ubuntu-latest
13+
runs-on: ${{ fromJSON(vars['UCI_SPELLCHECK_RUNNER'] || inputs['runner']) }}
914
steps:
1015
- uses: actions/checkout@v5
1116

.github/workflows/reusable-stale-issue.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Close Stale Issues
22

33
on:
44
workflow_call:
5+
inputs:
6+
runner:
7+
required: false
8+
type: string
9+
default: '"ubuntu-latest"'
510

611
jobs:
712
stale:
8-
runs-on: ubuntu-latest
13+
runs-on: ${{ fromJSON(vars['UCI_STALE_ISSUE_RUNNER'] || inputs['runner']) }}
914
permissions:
1015
issues: write
1116
pull-requests: write

.github/workflows/tagpush.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ name: Manual Release Nag
22

33
on:
44
workflow_call:
5+
inputs:
6+
runner:
7+
required: false
8+
type: string
9+
default: '"ubuntu-latest"'
510

611
jobs:
712
nag:
813
if: startsWith(github.ref, 'refs/tags') && github.event.pusher.name != 'web3-bot'
9-
runs-on: ubuntu-latest
14+
runs-on: ${{ fromJSON(vars['UCI_TAGPUSH_RUNNER'] || inputs['runner']) }}
1015
name: All
1116
steps:
1217
- id: tag

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### Added
99
- `env` input support to `go-test` and `go-check` workflows
1010
- `CHECKOUT_TOKEN` secret support to `go-test` and `go-check` workflows
11+
- custom `runner` configuration to most workflows
1112

1213
## [1.0.34] - 2025-09-16
1314
### Fixed

0 commit comments

Comments
 (0)