Skip to content

Commit 9e4b61b

Browse files
authored
ci: fix secret passing into reusable wokflow (#541)
* update secrets Signed-off-by: Asra Ali <asraa@google.com>
1 parent 7d9c629 commit 9e4b61b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/reuseable-snapshot-timestamp.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ name: Snapshot and Timestamp Template
1919
# TODO(asraa): Create user workflows for repository-beta/, and ceremony/ flows.
2020
on:
2121
workflow_call:
22+
secrets:
23+
token:
24+
description: >
25+
Optional token.
26+
This argument is passed, unchanged, to the job that creates the pull request.
27+
required: false
28+
default: ${{ github.token }}
2229
inputs:
2330
snapshot_key:
2431
description: 'Sets the snapshotting key reference'
@@ -51,10 +58,6 @@ on:
5158
required: false
5259
default: true
5360
type: boolean
54-
token:
55-
description: 'GitHub token used to create the PR. This allows the PR to trigger CI workflows'
56-
required: false
57-
default: ${{ github.token }}
5861

5962
jobs:
6063
snapshot_and_timestamp:
@@ -137,8 +140,6 @@ jobs:
137140
permissions:
138141
pull-requests: 'write'
139142
contents: 'write'
140-
secrets:
141-
token: ${{ input.token }}
142143
steps:
143144
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
144145
with:
@@ -157,6 +158,7 @@ jobs:
157158
branch: update-snapshot-timestamp
158159
signoff: true
159160
reviewers: asraa,dlorenc,haydentherapper,joshuagl
161+
token: ${{ secrets.token }}
160162

161163
if-push-failed:
162164
runs-on: ubuntu-latest

.github/workflows/stable-snapshot-timestamp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,5 @@ jobs:
4646
repo: 'repository/'
4747
provider: 'projects/163070369698/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
4848
service_account: 'github-actions@sigstore-root-signing.iam.gserviceaccount.com'
49+
secrets:
4950
token: ${{ secrets.SIGSTORE_ROOT_SIGNING_FINE_GRAINED_PAT }}

0 commit comments

Comments
 (0)