Upgrade workflow, add dependabot auto-upgrade for workflows

main
Rakshit Menpara 2023-04-01 12:43:57 +05:30
parent 7c6464e208
commit 4fbb8e3e9d
3 changed files with 38 additions and 23 deletions

7
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

View File

@ -15,50 +15,55 @@ jobs:
k8s: k8s:
- 1.19.16 - 1.19.16
- 1.20.15 - 1.20.15
- 1.21.12 - 1.21.14
- 1.22.9 - 1.22.17
- 1.23.6 - 1.23.17
- 1.24.0 - 1.24.12
- 1.25.8
- 1.26.3
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Helm - name: Set up Helm
uses: azure/setup-helm@v1 uses: azure/setup-helm@v3
with: with:
version: v3.8.1 version: v3.11.1
- name: Adding bitnamirepo - name: Adding bitnamirepo
run: | run: |
helm repo add bitnami https://charts.bitnami.com/bitnami 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: with:
python-version: 3.7 python-version: '3.9'
check-latest: true
- name: Set up chart-testing - 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) - name: Run chart-testing (list-changed)
id: list-changed id: list-changed
run: | run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true" echo "changed=true" >> "$GITHUB_OUTPUT"
fi fi
- name: Run chart-testing (lint) - name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }} run: ct lint --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster - 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' 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) - name: Run chart-testing (install)
run: ct install --target-branch ${{ github.event.repository.default_branch }}
if: steps.list-changed.outputs.changed == 'true' if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}

View File

@ -1,17 +1,19 @@
name: Release Charts name: Release Charts
on: on:
push: workflow_run:
branches: workflows: ["Lint and Test Charts"]
- main branches: [main]
types:
- completed
jobs: jobs:
release: release:
if: github.repository == 'Improwised/charts' if: github.repository == 'Improwised/charts' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@ -23,8 +25,9 @@ jobs:
- name: Adding bitnamirepo - name: Adding bitnamirepo
run: | run: |
helm repo add bitnami https://charts.bitnami.com/bitnami 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 - name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.0 uses: helm/chart-releaser-action@v1.5.0
env: env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"