From f392581edf6b2b5824c8997dc18bb3cd40abd2c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:55:59 +0000 Subject: [PATCH 1/3] Bump actions/github-script from 6 to 7 (#126) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/invoke-push.yaml | 2 +- .github/workflows/push.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/invoke-push.yaml b/.github/workflows/invoke-push.yaml index 6d23505e..16b775c2 100644 --- a/.github/workflows/invoke-push.yaml +++ b/.github/workflows/invoke-push.yaml @@ -23,7 +23,7 @@ jobs: ref: master - run: npm i octokit @octokit/core - name: Trigger push workflow - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index d42d2d66..32b552a9 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -39,7 +39,7 @@ jobs: path: self - name: Validate chart - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.GH_APP_PEM }} @@ -62,7 +62,7 @@ jobs: path: source - name: Package charts - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const helm = require('./self/.github/workflows/scripts/packageChart.js') @@ -72,7 +72,7 @@ jobs: run: npm i octokit fs @octokit/core - name: Update index and push files - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.GH_APP_PEM }} From b3ab6979455ea19d12d92ea7efd886d0de5f2d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ljubo=20Nikoli=C4=87?= Date: Wed, 13 Mar 2024 19:16:41 +0100 Subject: [PATCH 2/3] CI: add tests & linting for helm charts (#121) * test helm-chart-testing * upgrade helm/chart-testing-action -> 2.6.1 * - Resolve comments - HF: adjust condition and catch changed files * Add ct.yaml config to lint and install step * remove blank line --- .github/workflows/lint-test.yaml | 46 ++++++++++++++++++++++++++++++++ ct.yaml | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/lint-test.yaml create mode 100644 ct.yaml diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml new file mode 100644 index 00000000..6a670fda --- /dev/null +++ b/.github/workflows/lint-test.yaml @@ -0,0 +1,46 @@ +name: Lint and Test Charts + +on: [pull_request,push] + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed_files=$(ct list-changed --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} 2>/dev/null | wc -l | tr -d ' ') + echo "Changed files detected: $changed_files" + if [ $changed_files -ne 0 ]; then + echo "changed=true" >> $GITHUB_OUTPUT + else + echo "changed=false" >> $GITHUB_OUTPUT + fi + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false + + - name: Create kind cluster + if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.9.0 + + - name: Run chart-testing (install) + if: steps.list-changed.outputs.changed == 'true' + run: ct install --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} \ No newline at end of file diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 00000000..fbb97c8c --- /dev/null +++ b/ct.yaml @@ -0,0 +1,2 @@ +chart-dirs: + - ./ \ No newline at end of file From 07220666d8c282647d68981fd63070e7bee0fda6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:37:41 +0000 Subject: [PATCH 3/3] Bump helm/kind-action from 1.9.0 to 1.10.0 Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/helm/kind-action/releases) - [Commits](https://github.com/helm/kind-action/compare/v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: helm/kind-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 6a670fda..980278fc 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -39,7 +39,7 @@ jobs: - name: Create kind cluster if: steps.list-changed.outputs.changed == 'true' - uses: helm/kind-action@v1.9.0 + uses: helm/kind-action@v1.10.0 - name: Run chart-testing (install) if: steps.list-changed.outputs.changed == 'true'