mirror of
https://github.com/TeamPiped/Piped-Kubernetes.git
synced 2024-08-14 23:57:15 +00:00
3132a4400a
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
75 lines
2 KiB
YAML
75 lines
2 KiB
YAML
name: "Charts: Lint"
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
checkoutCommit:
|
|
required: true
|
|
type: string
|
|
isRenovatePR:
|
|
required: true
|
|
default: 'false'
|
|
type: string
|
|
chartsToLint:
|
|
description: >
|
|
A JSON encoded array of charts to lint
|
|
required: true
|
|
type: string
|
|
|
|
env:
|
|
HELM_VERSION: 3.10.2
|
|
|
|
jobs:
|
|
lint-chart:
|
|
if: ${{ inputs.chartsToLint != '[]' }}
|
|
name: Lint chart
|
|
strategy:
|
|
matrix:
|
|
chart: ${{ fromJSON(inputs.chartsToLint) }}
|
|
fail-fast: false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ inputs.checkoutCommit }}
|
|
|
|
- name: Verify chart version
|
|
uses: bjw-s/helm-charts-actions/verify-chart-version@main
|
|
id: verify-chart-version
|
|
with:
|
|
chart: "charts/${{ matrix.chart }}"
|
|
|
|
- name: Verify chart changelog
|
|
uses: bjw-s/helm-charts-actions/verify-chart-changelog@main
|
|
if: inputs.isRenovatePR != 'true'
|
|
id: verify-chart-changelog
|
|
with:
|
|
chart: "charts/${{ matrix.chart }}"
|
|
|
|
- name: Install Kubernetes tools
|
|
uses: yokawasa/action-setup-kube-tools@v0.9.3
|
|
with:
|
|
setup-tools: |
|
|
helmv3
|
|
helm: "${{ env.HELM_VERSION }}"
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.4.0
|
|
|
|
- name: Run chart-testing (install)
|
|
run: ct lint --config .ci/ct/ct.yaml --charts "charts/${{ matrix.chart }}"
|
|
|
|
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
|
|
lint_success:
|
|
needs:
|
|
- lint-chart
|
|
if: |
|
|
always()
|
|
name: Lint successful
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check lint matrix status
|
|
if: ${{ (inputs.chartsToLint != '' && inputs.chartsToLint != '[]') && (needs.lint-chart.result != 'success') }}
|
|
run: exit 1
|