Helm release #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Helm release | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
- ci/fix-helm-release | |
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: Git diff | |
id: git-diff | |
run: | | |
git diff --exit-code | |
if [ $? -eq 0 ]; then | |
echo "changes=false" >> $GITHUB_OUTPUT | |
else | |
echo "changes=true" >> $GITHUB_OUTPUT | |
fi | |
- name: "Commit changes and make PR" | |
if: steps.git-diff.changes == 'true' | |
run: | | |
git checkout -b helm/schema-update | |
git add charts/k6-operator/values.schema.json | |
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 }} |