Skip to content

Commit 65d6624

Browse files
committed
ci(gh-workflows): use vault secrets to fix issue with auto update token generation
1 parent ec186e4 commit 65d6624

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/automatic-update.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: read
13+
id-token: write
1314
steps:
15+
- id: get-secrets
16+
uses: grafana/shared-workflows/actions/get-vault-secrets@28361cdb22223e5f1e34358c86c20908e7248760 # get-vault-secrets-v1.1.0
17+
with:
18+
# Secrets placed in the ci/repo/grafana/grafana-plugin-examples path in Vault
19+
repo_secrets: |
20+
GITHUB_APP_ID=plugins-platform-bot-app:app_id
21+
GITHUB_APP_PRIVATE_KEY=plugins-platform-bot-app:app_pem
22+
1423
- name: Generate token
1524
id: generate_token
1625
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
1726
with:
18-
app-id: ${{ secrets.APP_ID }}
19-
private-key: ${{ secrets.APP_PEM }}
27+
app-id: ${{ env.GITHUB_APP_ID }}
28+
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
2029

2130
- name: Checkout repository
2231
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

0 commit comments

Comments
 (0)