Skip to content

Commit 34cf58a

Browse files
committed
fix(self-zizmor): fall back to default token for external runs
get-vault-secrets won't run on external repositories and therefore fail the whole run. This change enables the fallback to github.token.
1 parent 9491ee6 commit 34cf58a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/self-zizmor.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
steps:
3838
- id: get-secrets
3939
uses: grafana/shared-workflows/actions/[email protected]
40+
continue-on-error: true # Will fail for external repos
4041
with:
4142
# Secrets placed in the ci/common/<path> path in Vault
4243
common_secrets: |
@@ -46,6 +47,7 @@ jobs:
4647
id: get-github-token
4748
uses: actions/create-github-app-token@v2
4849
continue-on-error: true
50+
if: ${{ env.ZIZMOR_APP_ID != '' }}
4951
with:
5052
app-id: ${{ env.ZIZMOR_APP_ID }}
5153
private-key: ${{ env.ZIZMOR_PRIVATE_KEY }}

0 commit comments

Comments
 (0)