Skip to content

ci(common): rename jobs to make it easier checks requirements #576

ci(common): rename jobs to make it easier checks requirements

ci(common): rename jobs to make it easier checks requirements #576

name: charts-helm-checks
on:
pull_request:
env:
HELM_VERSION: v3.16.4
jobs:
check-changes:
name: charts-helm-checks/check-changes
permissions:
actions: read
contents: read
pull-requests: read
runs-on: ubuntu-latest
outputs:
changes-charts: ${{ steps.filter.outputs.charts }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
charts:
- '.github/workflows/charts-helm-checks.yml'
- 'charts/**'
lint:
name: charts-helm-checks/lint
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-charts == 'true' }}
runs-on: 'ubuntu-latest'
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- name: Lint
uses: WyriHaximus/github-action-helm3@fc4ba26e75cf5d08182c6ce3b72623c8bfd7272b # v3.1.0
with:
exec: helm lint charts/*
test:
name: charts-helm-checks/test (bpr)
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-charts == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 #v4.2.0
with:
version: ${{ env.HELM_VERSION }}
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b #v5.3.0
with:
python-version: '3.x'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@5aa1c68405a43a57240a9b2869379324b2bec0fc #v2.7.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/config/ct.yaml)
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/config/ct.yaml