diff --git a/.github/helm-docs.sh b/.github/helm-docs.sh index a416eec..80d6a7a 100755 --- a/.github/helm-docs.sh +++ b/.github/helm-docs.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euxo pipefail -HELM_DOCS_VERSION="0.15.0" +HELM_DOCS_VERSION="1.11.0" # install helm-docs curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz diff --git a/.github/kubeval.sh b/.github/kubeval.sh index ed4487e..d7101ec 100755 --- a/.github/kubeval.sh +++ b/.github/kubeval.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euxo pipefail -KUBEVAL_VERSION="0.15.0" +KUBEVAL_VERSION="v0.16.1" CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/master -- charts | cut -d '/' -f 2 | uniq)" SCHEMA_LOCATION="https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7f7ccdf..9afa0cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,26 +5,38 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - - name: Fetch history + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.12.1 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.4.0 + + - name: Run chart-testing (list-changed) + id: list-changed run: | - git fetch --prune --unshallow; - echo "commitmsg<> $GITHUB_ENV + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + - name: Run chart-testing (lint) - id: lint - uses: helm/chart-testing-action@v1.0.0 - if: "! contains(env.commitmsg, '[skip lint]')" - with: - command: lint - config: .github/ct.yaml + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} + - name: Create kind cluster - uses: helm/kind-action@v1.2.0 - if: "steps.lint.outputs.changed == 'true' && ! contains(env.commitmsg, '[skip install]')" + if: "steps.list-changed.outputs.changed == 'true' && ! contains(env.commitmsg, '[skip install]')" + uses: helm/kind-action@v1.7.0 + - name: Run chart-testing (install) - uses: helm/chart-testing-action@v1.0.0 - if: "steps.lint.outputs.changed == 'true' && ! contains(env.commitmsg, '[skip install]')" - with: - command: install - config: .github/ct.yaml + if: "steps.list-changed.outputs.changed == 'true' && ! contains(env.commitmsg, '[skip install]')" + run: ct install --target-branch ${{ github.event.repository.default_branch }} \ No newline at end of file