-
Notifications
You must be signed in to change notification settings - Fork 166
60 lines (50 loc) · 1.76 KB
/
helm-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Helm release
on:
workflow_dispatch: {}
push:
branches:
- main
paths:
- 'charts/k6-operator/Chart.yaml'
jobs:
generate-chart-schema:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Make changes to the file
run: |
make helm-schema
- name: Branch
run: |
git checkout -b helm/schema-update
git add charts/k6-operator/values.schema.json
git diff --cached | tee diff.file
echo "WC_DIFF=$(wc -c < diff.file)" >> "$GITHUB_OUTPUT"
- name: "Make PR"
if: ${{ steps.branch.WC_DIFF }} > 0
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "auto: generate schema json"
git push -u origin helm/schema-update
gh pr create --title "Helm schema update" -B main -H helm/schema-update --body "Auto-generated by Github Workflow"
# We're failing here, so that maintainer can review the PR and merge it. Then Helm release should be re-run.
echo "Review the PR with schema update and re-run Helm release."
exit 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
call-update-helm-repo:
needs:
- generate-chart-schema
permissions:
contents: write
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
with:
charts_dir: charts
cr_configfile: charts/cr.yaml
ct_configfile: charts/ct.yaml
helm_tag_prefix: helm
secrets:
github_app_id: ${{ secrets.K6_OPERATOR_HELM_RELEASE_APP_ID }}
github_app_pem: ${{ secrets.K6_OPERATOR_HELM_RELEASE_PEM_KEY }}