Skip to content

CI: Fix Helm Chart Publish Stage - Bump Postgres Chart to 16 #132

CI: Fix Helm Chart Publish Stage - Bump Postgres Chart to 16

CI: Fix Helm Chart Publish Stage - Bump Postgres Chart to 16 #132

name: Bootzooka Helm Chart CI
on:
push:
paths:
- "helm/**"
- ".github/**"
branches:
- master
pull_request:
paths:
- "helm/**"
- ".github/**"
jobs:
lint-chart:
name: Lint Helm Chart
runs-on: ubuntu-24.04
steps:
- name: Check-out repository
id: repo-checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4.3.0
with:
version: v3.17.1
- uses: actions/setup-python@v5.3.0
with:
python-version: "3.x"
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }}
install-test-chart:
needs:
- lint-chart
name: Install & Test Helm Chart
runs-on: ubuntu-24.04
strategy:
matrix:
k8s:
- v1.33.3
- v1.32.7
- v1.31.11
steps:
- name: Check-out repository
id: repo-checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create kind ${{ matrix.k8s }} cluster
id: kind-cluster-setup
uses: helm/kind-action@v1.2.0
with:
node_image: kindest/node:${{ matrix.k8s }}
wait: "120s"
- name: Set up Helm
uses: azure/setup-helm@v4.3.0
with:
version: v3.17.1
- uses: actions/setup-python@v5.3.0
with:
python-version: "3.x"
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }}
validate-chart-docs:
needs:
- lint-chart
- install-test-chart
name: Validate Helm Chart Docs
runs-on: ubuntu-24.04
steps:
- name: Check-out repository
id: repo-checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run helm-docs
id: helm-docs-run
uses: softwaremill/helm-docs-action@main
- name: Validate there's no diff
id: git-no-diff
run: git diff --exit-code
publish-chart:
# run only on push to master
if: github.event_name == 'push'
needs:
- lint-chart
- install-test-chart
- validate-chart-docs
name: Publish Helm Chart
runs-on: ubuntu-24.04
steps:
- name: Check-out repository
id: repo-checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Publish Helm Chart
id: helm-publish-chart
uses: stefanprodan/helm-gh-pages@v1.2.0
with:
token: ${{ secrets.CR_TOKEN }}
charts_dir: helm
charts_url: https://softwaremill.github.io/sml-helm-public-repo
owner: softwaremill
repository: sml-helm-public-repo
helm_version: 3.7.1
linting: off