diff --git a/.github/cr-config.yaml b/.github/cr-config.yaml new file mode 100644 index 0000000..8bb7ee8 --- /dev/null +++ b/.github/cr-config.yaml @@ -0,0 +1,2 @@ +generate-release-notes: true +skip-existing: true diff --git a/.github/ct-install-config.yaml b/.github/ct-install-config.yaml new file mode 100644 index 0000000..244e193 --- /dev/null +++ b/.github/ct-install-config.yaml @@ -0,0 +1,2 @@ +debug: true +all: true diff --git a/.github/ct-lint-config.yaml b/.github/ct-lint-config.yaml new file mode 100644 index 0000000..244e193 --- /dev/null +++ b/.github/ct-lint-config.yaml @@ -0,0 +1,2 @@ +debug: true +all: true diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml new file mode 100644 index 0000000..b5d4e42 --- /dev/null +++ b/.github/workflows/lint-test.yaml @@ -0,0 +1,58 @@ +name: Lint and Test Charts + +on: + push: + branches: [master] + paths: + - "charts/**" + - ".github/workflows/**" + pull_request: + branches: [master] + paths: + - "charts/**" + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (lint) + run: ct lint --config .github/ct-lint-config.yaml + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Helm + uses: azure/setup-helm@v4 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> $GITHUB_OUTPUT + fi + - name: Run chart-testing (lint) + run: | + helm repo add bjw-s https://bjw-s.github.io/helm-charts + ct lint --chart-dirs charts --all + + - name: Create kind cluster + uses: helm/kind-action@v1.10.0 + + - name: Run chart-testing (install) + run: ct install --config .github/ct-install-config.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 252bd75..b454f2c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -91,6 +91,7 @@ jobs: uses: helm/chart-releaser-action@v1.5.0 if: steps.package_charts.outputs.changed_charts != '' with: + config: .github/cr-config.yaml skip_packaging: true env: CR_TOKEN: ${{ steps.app-token.outputs.token }}