From 4fbb8e3e9d95ab2089f90a7c717a66aaa6895eee Mon Sep 17 00:00:00 2001 From: Rakshit Menpara <205111+deltasquare4@users.noreply.github.com> Date: Sat, 1 Apr 2023 12:43:57 +0530 Subject: [PATCH] Upgrade workflow, add dependabot auto-upgrade for workflows --- .github/dependabot.yml | 7 ++++++ .github/workflows/lint-test.yaml | 39 ++++++++++++++++++-------------- .github/workflows/release.yaml | 15 +++++++----- 3 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e33811f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 7fd3a50..9fec994 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -15,50 +15,55 @@ jobs: k8s: - 1.19.16 - 1.20.15 - - 1.21.12 - - 1.22.9 - - 1.23.6 - - 1.24.0 + - 1.21.14 + - 1.22.17 + - 1.23.17 + - 1.24.12 + - 1.25.8 + - 1.26.3 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Helm - uses: azure/setup-helm@v1 + uses: azure/setup-helm@v3 with: - version: v3.8.1 + version: v3.11.1 - name: Adding bitnamirepo run: | helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add bitnami-full-index https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.9' + check-latest: true - name: Set up chart-testing - uses: helm/chart-testing-action@v2.2.1 + uses: helm/chart-testing-action@v2.4.0 - name: Run chart-testing (list-changed) id: list-changed run: | changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" + echo "changed=true" >> "$GITHUB_OUTPUT" fi + - name: Run chart-testing (lint) + 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 - with: - version: "v0.13.0" - node_image: "kindest/node:v${{ matrix.k8s }}" - # Only build a kind cluster if there are chart changes to test. if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.5.0 + with: + version: "v0.17.0" + node_image: "kindest/node:v${{ matrix.k8s }}" - name: Run chart-testing (install) - run: ct install --target-branch ${{ github.event.repository.default_branch }} if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch ${{ github.event.repository.default_branch }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 129db8d..4c2d638 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,17 +1,19 @@ name: Release Charts on: - push: - branches: - - main + workflow_run: + workflows: ["Lint and Test Charts"] + branches: [main] + types: + - completed jobs: release: - if: github.repository == 'Improwised/charts' + if: github.repository == 'Improwised/charts' && github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 @@ -23,8 +25,9 @@ jobs: - name: Adding bitnamirepo run: | helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add bitnami-full-index https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.2.0 + uses: helm/chart-releaser-action@v1.5.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"