Skip to content

chore(main): [bot] release t8s-cluster:9.3.0 #9848

chore(main): [bot] release t8s-cluster:9.3.0

chore(main): [bot] release t8s-cluster:9.3.0 #9848

Workflow file for this run

name: Lint Helm Charts
on:
pull_request:
paths:
- charts/**
merge_group:
types:
- checks_requested
jobs:
getChangedChartsPR:
uses: ./.github/workflows/get-changed-charts-pr.yaml
if: ${{ github.event.pull_request != null }}
permissions:
pull-requests: read
with:
pr_number: ${{ github.event.pull_request.number || 0 }}
getChangedChartsMQ:
uses: ./.github/workflows/get-changed-charts-merge-queue.yaml
if: ${{ github.event.merge_group != null }}
permissions:
contents: read
with:
base_commit: ${{ github.event.merge_group.base_sha || '' }}
head_commit: ${{ github.event.merge_group.head_sha || '' }}
lint-helm-chart:
name: lint helm chart
permissions:
contents: read
runs-on: ubuntu-latest
if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }}
needs:
- getChangedChartsPR
- getChangedChartsMQ
strategy:
matrix:
chart: ${{ fromJson(needs.getChangedChartsPR.outputs.charts || needs.getChangedChartsMQ.outputs.charts) }}
env:
CT_TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.event.merge_group.base_ref || github.event.repository.default_branch }}
CHART: ${{ matrix.chart }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- run: pip install yq
- name: Install sponge
run: sudo apt-get -yq install moreutils
- name: Extract helm repos
id: helm-repos
run: |
[[ "$RUNNER_DEBUG" == 1 ]] && set -x
(
echo -n "repos="
yq -r '.dependencies[] | .repository' "charts/$CHART/Chart.yaml" | sort -u | grep https:// | awk '{printf (NR>1 ? "," : "") NR "=" $1}'
echo
) | tee -a "$GITHUB_OUTPUT"
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: 3.9
- run: ./.github/scripts/prepare-values.sh "charts/$CHART"
- uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
- name: Lint chart
env:
CT_CHART_REPOS: ${{ steps.helm-repos.outputs.repos }}
CT_CHARTS: charts/${{ matrix.chart }}
run: |
[[ "$RUNNER_DEBUG" == 1 ]] && set -x
if ! [[ -f "charts/$CHART/values.yaml" ]]; then
echo "No values.yaml found for $CHART, skipping 'ct lint'" >&2
helm lint "charts/$CHART"
else
ct lint --check-version-increment=false
fi
- run: ./.github/scripts/templateHelmChartRecursivelyToFolder.sh "charts/$CHART" /tmp/templated
id: templateChart
- run: ./.github/scripts/extract-artifacthub-images.sh "charts/$CHART" /tmp/templated
if: ${{ steps.templateChart.outputs.skipped == 'false' }}
- run: ./.github/scripts/enforce-trusted-registries.sh "charts/$CHART"
if: ${{ steps.templateChart.outputs.skipped == 'false' }}
- name: Download Pluto
uses: FairwindsOps/pluto/github-action@282bddb2e5a1e8a9398da41a896367995cee97ff # v5
if: ${{ steps.templateChart.outputs.skipped == 'false' }}
- run: pluto detect-files -d /tmp/templated -o custom --columns 'FILEPATH,NAME,KIND,VERSION,REPLACEMENT,REMOVED,DEPRECATED,REPL AVAIL'
if: ${{ steps.templateChart.outputs.skipped == 'false' }}