Skip to content

Commit 09b331a

Browse files
committed
ci: update helm release to use vault
1 parent bbd7f93 commit 09b331a

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.github/workflows/helm-release.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
name: Helm release
3-
permissions: {}
3+
# These permissions are needed to assume roles from Github's OIDC.
4+
permissions:
5+
contents: read
6+
id-token: write
47

58
on:
69
workflow_dispatch: {}
@@ -55,12 +58,26 @@ jobs:
5558
call-update-helm-repo:
5659
needs:
5760
- generate-chart-schema
58-
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
59-
with:
60-
charts_dir: charts
61-
cr_configfile: charts/cr.yaml
62-
ct_configfile: charts/ct.yaml
63-
helm_tag_prefix: helm
64-
secrets:
65-
github_app_id: ${{ secrets.K6_OPERATOR_HELM_RELEASE_APP_ID }}
66-
github_app_pem: ${{ secrets.K6_OPERATOR_HELM_RELEASE_PEM_KEY }}
61+
steps:
62+
- id: get-secrets
63+
uses: grafana/shared-workflows/actions/[email protected]
64+
with:
65+
repo_secrets: |
66+
APP_ID=github-app:app-id
67+
APP_PRIVATE_KEY=github-app:private-key
68+
# Set to false to get secrets as outputs instead of environment variables
69+
export_env: false
70+
71+
- id: publish-helm-release
72+
env:
73+
K6_OPERATOR_HELM_RELEASE_APP_ID: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_ID }}
74+
K6_OPERATOR_HELM_RELEASE_PEM_KEY: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_PRIVATE_KEY }}
75+
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
76+
with:
77+
charts_dir: charts
78+
cr_configfile: charts/cr.yaml
79+
ct_configfile: charts/ct.yaml
80+
helm_tag_prefix: helm
81+
secrets:
82+
github_app_id: ${K6_OPERATOR_HELM_RELEASE_APP_ID}
83+
github_app_pem: ${K6_OPERATOR_HELM_RELEASE_PEM_KEY}

0 commit comments

Comments
 (0)