Files
lasuite-docs/.github/workflows/helmfile-linter.yaml
T
Manuel RaynaudandAnthony LC 9de17b3f82 👷(ci) cancel the superseded runs of a pull request
adding a concurrency group will now stop running CI if a new push is
made on the same branch.
2026-10-01 16:29:43 +02:00

38 lines
1.1 KiB
YAML

name: Helmfile lint
run-name: Helmfile lint
on:
push:
pull_request:
branches:
- 'main'
# One run per pull request: a new push cancels the checks of the previous one.
# Pushes get a group of their own (the commit), so every commit of main keeps
# its full set of checks.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
helmfile-lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/helmfile/helmfile:v0.171.0
steps:
-
name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
-
name: Helmfile lint
shell: bash
run: |
set -e
HELMFILE=src/helm/helmfile.yaml.gotmpl
environments=$(awk 'BEGIN {in_env=0} /^environments:/ {in_env=1; next} /^---/ {in_env=0} in_env && /^ [^ ]/ {gsub(/^ /,""); gsub(/:.*$/,""); print}' "$HELMFILE")
for env in $environments; do
echo "################### $env lint ###################"
helmfile -e $env lint -f $HELMFILE || exit 1
echo -e "\n"
done