Files
helm-charts-hardened/.github/workflows/helm-chart-ci.yaml
T
dependabot[bot] ea3b07983e Bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-01-06 19:05:53 +01:00

128 lines
3.1 KiB
YAML

name: Helm Chart CI
on:
workflow_dispatch:
pull_request:
paths:
- 'charts/**'
- '.github/workflows/helm-chart-ci.yml'
- '.github/scripts/*.sh'
- '.github/kind/conf/kind-config.yaml'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
HELM_VERSION: v3.10.2
PYTHON_VERSION: 3.11.1
CHART_TESTING_VERSION: v3.7.1
jobs:
check-docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Verify Docs updated
run: .github/scripts/helm-docs.sh
lint-chart:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/[email protected]
with:
version: ${{ env.HELM_VERSION }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup chart-testing
uses: helm/[email protected]
with:
version: ${{ env.CHART_TESTING_VERSION }}
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch main)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
run: |
ct lint --debug \
--target-branch main
outputs:
changed: ${{ steps.list-changed.outputs.changed }}
test:
runs-on: ubuntu-22.04
needs:
- lint-chart
if: needs.lint-chart.outputs.changed == 'true'
strategy:
fail-fast: false
matrix:
# Choose tags corresponding to the version of Kind being used.
# At a minimum, we should test the currently supported versions of
# Kubernetes, but can go back farther as long as we don't need heroics
# to pull it off (i.e. kubectl version juggling).
k8s:
- v1.25.3
- v1.24.7
- v1.23.13
- v1.22.15
- v1.21.14
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/[email protected]
with:
version: ${{ env.HELM_VERSION }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup chart-testing
uses: helm/[email protected]
with:
version: ${{ env.CHART_TESTING_VERSION }}
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/[email protected]
# Only build a kind cluster if there are chart changes to test.
with:
version: v0.17.0
node_image: kindest/node:${{ matrix.k8s }}
config: .github/kind/conf/kind-config.yaml
verbosity: 1
- name: Run chart-testing (install)
run: |
ct install --debug \
--target-branch main \
--exclude-deprecated