Helm release #44
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 | ||
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: | ||
Check failure on line 47 in .github/workflows/helm-release.yaml GitHub Actions / Helm releaseInvalid workflow file
|
||
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 }} |