Skip to content

Commit 5de460f

Browse files
committed
Pass checkout-token through inputs
1 parent 956af81 commit 5de460f

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

.github/workflows/go-check.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ on:
1919
required: false
2020
type: string
2121
default: '"ubuntu-latest"'
22-
secrets:
23-
CHECKOUT_TOKEN:
22+
checkout-token:
2423
required: false
24+
type: string
25+
default: ${{ github.token }}
2526

2627
jobs:
2728
unit:
@@ -38,7 +39,7 @@ jobs:
3839
uses: actions/checkout@v5
3940
with:
4041
submodules: recursive
41-
token: ${{ secrets.CHECKOUT_TOKEN }}
42+
token: ${{ inputs.checkout-token }}
4243
- name: Extend the GitHub context
4344
id: github
4445
env:

.github/workflows/go-test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ on:
2929
required: false
3030
type: string
3131
default: '["ubuntu", "windows", "macos"]'
32+
checkout-token:
33+
required: false
34+
type: string
35+
default: ${{ github.token }}
3236
secrets:
3337
CODECOV_TOKEN:
3438
required: false
35-
CHECKOUT_TOKEN:
36-
required: false
3739

3840
defaults:
3941
run:
@@ -70,7 +72,7 @@ jobs:
7072
uses: actions/checkout@v5
7173
with:
7274
submodules: recursive
73-
token: ${{ secrets.CHECKOUT_TOKEN }}
75+
token: ${{ inputs.checkout-token }}
7476
- name: Check out the latest stable version of Go
7577
id: stable
7678
uses: actions/setup-go@v5

.github/workflows/release-check.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ on:
1414
required: false
1515
type: string
1616
default: '/'
17+
env:
18+
required: false
19+
type: string
1720
runner:
1821
required: false
1922
type: string
2023
default: '"ubuntu-latest"'
24+
checkout-token:
25+
required: false
26+
type: string
27+
default: ${{ github.token }}
2128
outputs:
2229
json:
2330
description: JSON aggregation of release.json artifacts

.github/workflows/releaser.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@ on:
1818
required: false
1919
type: boolean
2020
default: false
21+
env:
22+
required: false
23+
type: string
2124
runner:
2225
required: false
2326
type: string
2427
default: '"ubuntu-latest"'
28+
checkout-token:
29+
required: false
30+
type: string
31+
default: ${{ github.token }}
32+
release-token:
33+
required: false
34+
type: string
35+
default: ${{ github.token }}
2536
outputs:
2637
json:
2738
description: JSON aggregation of release.json artifacts
@@ -160,7 +171,7 @@ jobs:
160171
generate_release_notes: true
161172
target_commitish: ${{ github.sha }}
162173
make_latest: ${{ steps.version.outputs.prefix == 'v' && steps.version.outputs.suffix == '' && steps.version.outputs.tag == steps.latest.outputs.latest }}
163-
token: ${{ secrets.UCI_GITHUB_TOKEN || github.token }}
174+
token: ${{ secrets.UCI_GITHUB_TOKEN || inputs.release-token }}
164175
- name: Create release.json
165176
if: steps.release.outputs.id != ''
166177
id: json

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88
### Added
9-
- `env` input support to `go-test` and `go-check` workflows
10-
- `CHECKOUT_TOKEN` secret support to `go-test` and `go-check` workflows
9+
- `env` input support to `go-test`, `go-check`, `releaser` and `release-check` workflows
10+
- `checkout-token` input support to `go-test`, `go-check`, `releaser` and `release-check` workflows
1111
- custom `runner` configuration to most workflows
1212
- `os-versions` input support to `go-test` workflow
1313

0 commit comments

Comments
 (0)