Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/install-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test Helm Charts

on:
workflow_run:
workflows: ["Lint Helm Charts"]
types: [completed]

jobs:
install-test:
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request'

environment: github-cicd
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.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 "changed=true" >> "$GITHUB_OUTPUT"
fi

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

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}
27 changes: 7 additions & 20 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Lint and Test Charts
name: Lint Helm Charts

on: pull_request
on:
pull_request:

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

Expand All @@ -16,30 +16,17 @@ jobs:
with:
version: v3.12.1

- uses: actions/setup-python@v4
with:
python-version: "3.10"
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0

- name: Run chart-testing (list-changed)
- name: List changed charts
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: Run chart-testing (lint)
- name: Lint charts
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }}

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

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