Skip to content

Commit 0b4bb91

Browse files
authored
fix: leverage github app secrets in helm release workflow (#3635)
1 parent e696502 commit 0b4bb91

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/helm-release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ on:
66
- main
77
- "release-[0-9]+.[0-9]+"
88

9+
# NOTE: We need to store GH_RELEASES_APP_ID and GH_RELEASES_APP_PRIVATE_KEY as repository secrets
10+
# (even though we already store them in Vault) due to limitations in how secrets can be
11+
# accessed and passed between different parts of a GitHub Actions workflow.
12+
#
13+
# The grafana/helm-charts/.github/workflows/update-helm-repo.yaml is a reusable workflow,
14+
# not a composite action. This means we can't run steps to retrieve secrets from Vault
15+
# before calling this workflow within the same job.
16+
#
17+
# While we have access to the grafana/shared-workflows/actions/get-vault-secrets@main action,
18+
# environment variables set by this action in one job are not accessible in other jobs or
19+
# in reusable workflows called from this workflow.
20+
921
jobs:
1022
call-update-helm-repo:
1123
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
@@ -14,4 +26,5 @@ jobs:
1426
cr_configfile: operations/pyroscope/helm/cr.yaml
1527
ct_configfile: operations/pyroscope/helm/ct.yaml
1628
secrets:
17-
helm_repo_token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
29+
github_app_id: ${{ secrets.GH_RELEASES_APP_ID }}
30+
github_app_pem: ${{ secrets.GH_RELEASES_APP_PRIVATE_KEY }}

0 commit comments

Comments
 (0)