Skip to content

Commit 594eea5

Browse files
committed
test: use variable to specify target branch
1 parent 4282f1f commit 594eea5

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.ci/ct.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
remote: origin/master
32
chart-dirs:
43
- charts
54
chart-repos:

.github/workflows/chart-testing.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
- name: Run chart-testing (list-changed)
4141
id: list-changed
4242
run: |
43-
changed=$(ct list-changed --config .ci/ct.yaml)
43+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml)
4444
if [[ -n "$changed" ]]; then
4545
echo "::set-output name=changed::true"
4646
fi
4747
4848
- name: Run chart-testing (lint)
4949
id: lint
50-
run: ct lint --config .ci/ct.yaml
50+
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml
5151

5252
- name: Create kind cluster
5353
uses: helm/kind-action@v1.12.0
@@ -67,6 +67,6 @@ jobs:
6767
if: steps.list-changed.outputs.changed == 'true'
6868

6969
- name: Run chart-testing (install)
70-
run: ct install --config .ci/ct.yaml
70+
run: ct install --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml
7171
# Only install if there are chart changes to test.
7272
if: steps.list-changed.outputs.changed == 'true'

0 commit comments

Comments
 (0)