Skip to content

Commit 74012ab

Browse files
committed
ci: update helm release to use vault
1 parent bbd7f93 commit 74012ab

File tree

3 files changed

+58
-10
lines changed

3 files changed

+58
-10
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: publish-helm-release
2+
3+
runs:
4+
steps:
5+
- id: get-secrets
6+
uses: grafana/shared-workflows/actions/[email protected]
7+
with:
8+
repo_secrets: |
9+
APP_ID=github-app:app-id
10+
APP_PRIVATE_KEY=github-app:private-key
11+
# Set to false to get secrets as outputs instead of environment variables
12+
export_env: false
13+
14+
- id: publish-helm-release
15+
env:
16+
K6_OPERATOR_HELM_RELEASE_APP_ID: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_ID }}
17+
K6_OPERATOR_HELM_RELEASE_PEM_KEY: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_PRIVATE_KEY }}
18+
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
19+
with:
20+
charts_dir: charts
21+
cr_configfile: charts/cr.yaml
22+
ct_configfile: charts/ct.yaml
23+
helm_tag_prefix: helm
24+
secrets:
25+
github_app_id: ${K6_OPERATOR_HELM_RELEASE_APP_ID}
26+
github_app_pem: ${K6_OPERATOR_HELM_RELEASE_PEM_KEY}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: publish-helm-release
2+
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- id: get-secrets
7+
uses: grafana/shared-workflows/actions/[email protected]
8+
with:
9+
repo_secrets: |
10+
APP_ID=github-app:app-id
11+
APP_PRIVATE_KEY=github-app:private-key
12+
# Set to false to get secrets as outputs instead of environment variables
13+
export_env: false
14+
15+
- id: publish-helm-release
16+
env:
17+
K6_OPERATOR_HELM_RELEASE_APP_ID: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_ID }}
18+
K6_OPERATOR_HELM_RELEASE_PEM_KEY: ${{ fromJSON(steps.get-secrets.outputs.secrets).APP_PRIVATE_KEY }}
19+
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
20+
with:
21+
charts_dir: charts
22+
cr_configfile: charts/cr.yaml
23+
ct_configfile: charts/ct.yaml
24+
helm_tag_prefix: helm
25+
secrets:
26+
github_app_id: ${K6_OPERATOR_HELM_RELEASE_APP_ID}
27+
github_app_pem: ${K6_OPERATOR_HELM_RELEASE_PEM_KEY}

.github/workflows/helm-release.yaml

Lines changed: 5 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,4 @@ 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+
uses: ./.github/actions/publish-helm-release

0 commit comments

Comments
 (0)