oncall-engine/.github/workflows/helm_release_pr.yml
Joey Orlando b26706e7e4
configure yamllint pre-commit step (#2728)
# What this PR does

Add [`yamllint`](https://github.com/adrienverge/yamllint) to
`pre-commit` configuration + fix pre-existing errors

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-03 02:35:08 -04:00

42 lines
1.8 KiB
YAML

name: Create PR to release updated oncall Helm chart
"on":
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
update-helm-chart-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Define app_version and helm version
id: tags
run: |
# Strip git ref prefix from version
APP_VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && HELM_VERSION=$(echo $APP_VERSION | sed -e 's/^v//')
echo "::set-output name=app_version::$APP_VERSION"
echo "::set-output name=helm_version::$HELM_VERSION"
- name: Update oncall Helm chart Chart.yaml
uses: fjogeleit/yaml-update-action@v0.12.3
with:
valueFile: "helm/oncall/Chart.yaml"
branch: helm-release/${{ steps.tags.outputs.helm_version }}
targetBranch: main
masterBranchName: main
createPR: "true"
description: "Merge this PR to `main` branch to start another
[github actions job](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release.yml)
that will release the updated version of the chart
(version: ${{ steps.tags.outputs.helm_version }}, appVersion: ${{ steps.tags.outputs.app_version }})
into `grafana/helm-charts` helm repository. \n\n
This PR was created automatically by this
[github action](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release_pr.yml)."
message: "Release oncall Helm chart ${{ steps.tags.outputs.helm_version }}"
changes: |
{
"version": "${{ steps.tags.outputs.helm_version }}",
"appVersion": "${{ steps.tags.outputs.app_version }}"
}