Release Charts #65
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: Release Charts | |
on: | |
workflow_dispatch: | |
inputs: | |
skip-checks: | |
description: "Skip checks before releasing?" | |
type: boolean | |
default: false | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- "v**" | |
paths: | |
- 'charts/**/Chart.yaml' | |
concurrency: | |
group: release-charts-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CHARTS_DIR: ./charts | |
HELM_DOCS_VERSION: 1.11.0 | |
jobs: | |
determine-release-version: | |
runs-on: ubuntu-latest | |
outputs: | |
current: ${{ steps.release-version.outputs.version_tag }} | |
previous: v${{ steps.release-version.outputs.previous_version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Determine Release-Version | |
id: release-version | |
uses: paulhatch/[email protected] | |
with: | |
tag_prefix: "v" | |
version_format: "${major}.${minor}.${patch}" | |
search_commit_body: true | |
check-charts: | |
if: github.event.inputs.skip-checks != 'true' && needs.determine-release-version.previous != 'v0.0.0' | |
needs: | |
- determine-release-version | |
uses: ./.github/workflows/checks.yml | |
with: | |
target-branch: ${{ needs.determine-release-version.previous }} | |
release-charts: | |
if: always() && !cancelled() && !failure() && needs.determine-release-version.previous != 'v0.0.0' | |
runs-on: ubuntu-latest | |
needs: | |
- determine-release-version | |
- check-charts | |
permissions: | |
contents: write | |
pages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
- name: Install helm-docs | |
run: "curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz \\\n https://github.com/norwoodj/helm-docs/releases/download/v\"${HELM_DOCS_VERSION}\"/helm-docs_\"${HELM_DOCS_VERSION}\"_Linux_x86_64.tar.gz\ntar -xf /tmp/helm-docs.tar.gz helm-docs \n #magic___^_^___line\n" | |
- name: Replace templates with actual README for charts | |
run: | | |
./helm-docs | |
find $CHARTS_DIR -type f -name README.md.gotmpl -exec rm {} + | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
with: | |
charts_dir: ${{ env.CHARTS_DIR }} | |
env: | |
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
CR_RELEASE_NAME_TEMPLATE: ${{ needs.determine-release-version.outputs.current }} | |
release-readmes: | |
uses: ./.github/workflows/release-readmes.yml | |
secrets: inherit | |
needs: | |
- release-charts | |
permissions: | |
contents: read | |
pages: write | |