Update charts-lint.yaml

This commit is contained in:
Kjeld Schouten-Lebbing
2022-03-30 19:59:15 +02:00
committed by GitHub
parent caeaddfbba
commit 91f52152c9
+57 -19
View File
@@ -11,31 +11,26 @@ on:
type: string
jobs:
lint:
name: Lint charts
generate-lint-matrix:
name: Generate matrix for lint
runs-on: ubuntu-latest
outputs:
matrix: |
{
"chart": ${{ steps.list-changed.outputs.charts }}
}
detected: ${{ steps.list-changed.outputs.detected }}
steps:
- name: Checkout
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: Install Kubernetes tools
uses: yokawasa/action-setup-kube-tools@c81bf94cddd6c3172e6f61aa7f5ad66a2b5db98d # tag=v0.8.0
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@0ebf233433c08fb9061af664d501c3f3ff0e9e20 # tag=v3
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@dae259e86a35ff09145c0805e2d7dd3f7207064a # tag=v2.2.1
uses: helm/chart-testing-action@v2.2.1
- name: Collect changes
- name: Run chart-testing (list-changed)
id: list-changed
if: inputs.chartChangesDetected == 'true'
run: |
@@ -48,7 +43,50 @@ jobs:
echo "::set-output name=detected::true"
fi
lint-charts:
needs:
- generate-lint-matrix
if: needs.generate-lint-matrix.outputs.detected == 'true'
name: lint charts
strategy:
matrix: ${{ fromJson(needs.generate-lint-matrix.outputs.matrix) }}
fail-fast: true
max-parallel: 15
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.checkoutCommit }}
- name: lint Kubernetes tools
uses: yokawasa/action-setup-kube-tools@v0.8.0
with:
setup-tools: |
helmv3
helm: "3.8.0"
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
- name: Run chart-testing (lint)
id: lint
if: steps.list-changed.outputs.detected == 'true'
run: ct lint --config .github/ct-lint.yaml
run: ct lint --config .github/ct-lint.yaml --charts ${{ matrix.chart }}
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
lint_success:
needs:
- generate-lint-matrix
- lint-charts
if: |
always()
name: Lint successful
runs-on: ubuntu-latest
steps:
- name: Check lint matrix status
if: ${{ (needs.generate-lint-matrix.outputs.detected == 'true') && (needs.lint-charts.result != 'success') }}
run: exit 1