Skip to content

Commit d726c00

Browse files
committed
Added CT Config
Edited workflow to avoid linting already merged charts
1 parent b15f994 commit d726c00

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/chart_workflow.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,25 @@ jobs:
1616

1717
- name: "Set Up Helm"
1818
uses: azure/setup-helm@v3.3
19+
if: github.ref != 'refs/heads/main'
1920
with:
2021
version: v3.4.1
2122

2223
- name: "Set Up Python"
2324
uses: actions/setup-python@v4.2.0
25+
if: github.ref != 'refs/heads/main'
2426
with:
2527
python-version: 3.9
2628

2729
- name: "Set up chart-testing"
2830
uses: helm/chart-testing-action@v2.3.0
31+
if: github.ref != 'refs/heads/main'
2932
with:
3033
version: v3.3.0
3134

3235
- name: "Run chart-testing (list-changed)"
3336
id: list-changed
37+
if: github.ref != 'refs/heads/main'
3438
run: |
3539
changed=$(ct list-changed --config ct.yaml)
3640
if [[ -n "$changed" ]]; then
@@ -39,15 +43,15 @@ jobs:
3943
4044
- name: "Run chart-testing (lint)"
4145
run: ct lint --config ct.yaml
42-
if: steps.list-changed.outputs.changed == 'true'
46+
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'
4347

4448
- name: Create kind cluster
4549
uses: helm/kind-action@v1.4.0
46-
if: steps.list-changed.outputs.changed == 'true'
50+
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'
4751

4852
- name: Run chart-testing (install)
4953
run: ct install --config ct.yaml
50-
if: steps.list-changed.outputs.changed == 'true'
54+
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'
5155

5256
release:
5357
runs-on: ubuntu-latest

ct.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
remote: origin
2+
chart-dirs:
3+
- charts
4+
helm-extra-args: --timeout 900s
5+
target-branch: main
6+
validate-maintainers: false

0 commit comments

Comments
 (0)