Skip to content

Commit

Permalink
Add github action to verify helm changes
Browse files Browse the repository at this point in the history
Signed-off-by: chandankumar4 <chandan.kr404@gmail.com>
  • Loading branch information
chandankumar4 committed May 22, 2024
1 parent 07eef6b commit f24560b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: verify

on: pull_request

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: "Step 1: Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Step 2: Set up Helm"
uses: azure/setup-helm@v4.2.0
with:
version: v3.14.4

- uses: "Step 3: actions/setup-python@v5"
with:
python-version: '3.x'
check-latest: true

- name: "Step 4: Set up chart-testing"
uses: helm/chart-testing-action@v2.6.1

- name: "Step 5: 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 "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: "Step 6: Run lint"
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}

- name: "Step 7: Create kind cluster"
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.10.0

- name: "Step 7: Run chart install"
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}

0 comments on commit f24560b

Please sign in to comment.