sigs.k8s.io/external-dns@v0.14.1/.github/workflows/lint-test-chart.yaml (about)

     1  name: Lint and Test Chart
     2  
     3  on:
     4    pull_request:
     5      paths:
     6        - "charts/external-dns/**"
     7  
     8  jobs:
     9    lint-test:
    10      if: github.repository == 'kubernetes-sigs/external-dns'
    11      runs-on: ubuntu-latest
    12      defaults:
    13        run:
    14          shell: bash
    15      steps:
    16        - name: Checkout
    17          uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
    18          with:
    19            fetch-depth: 0
    20  
    21        - name: Install Helm Docs
    22          uses: action-stars/install-tool-from-github-release@9019d0a3125e2f45a48858afb632e6dbef663d79 # v0.2.2
    23          with:
    24            github_token: ${{ secrets.GITHUB_TOKEN }}
    25            owner: norwoodj
    26            repository: helm-docs
    27            arch_amd64: x86_64
    28            os_linux: Linux
    29            check_command: helm-docs --version
    30            version: latest
    31  
    32        - name: Run Helm Docs check
    33          run: |
    34            set -euo pipefail
    35            helm-docs
    36            if [[ -n "$(git status --porcelain --untracked-files=no)" ]]
    37            then
    38              echo "Documentation not up to date. Please run helm-docs and commit changes!" >&2
    39              exit 1
    40            fi
    41  
    42        - name: Install Artifact Hub CLI
    43          uses: action-stars/install-tool-from-github-release@9019d0a3125e2f45a48858afb632e6dbef663d79 # v0.2.2
    44          with:
    45            github_token: ${{ github.token }}
    46            owner: artifacthub
    47            repository: hub
    48            name: ah
    49            check_command: ah version
    50            version: latest
    51  
    52        - name: Run Artifact Hub lint
    53          run: ah lint --kind helm || exit 1
    54  
    55        - name: Install Helm
    56          uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
    57          with:
    58            token: ${{ github.token }}
    59            version: latest
    60  
    61        - name: Install Python
    62          uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
    63          with:
    64            token: ${{ github.token }}
    65            python-version: "3.x"
    66  
    67        - name: Set-up chart-testing
    68          uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
    69  
    70        - name: Check for changes
    71          id: changes
    72          run: |
    73            changed=$(ct list-changed)
    74            if [[ -n "$changed" ]]; then
    75              echo "changed=true" >> "${GITHUB_OUTPUT}"
    76            fi
    77  
    78        - name: Run chart-testing lint
    79          run: ct lint --check-version-increment=false
    80  
    81        - name: Create Kind cluster
    82          if: steps.changes.outputs.changed == 'true'
    83          uses: helm/kind-action@99576bfa6ddf9a8e612d83b513da5a75875caced # v1.9.0
    84          with:
    85            wait: 120s
    86  
    87        - name: Run chart-testing install
    88          if: steps.changes.outputs.changed == 'true'
    89          run: ct install