diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 303689b..377110c 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -23,18 +23,18 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 + - name: Current branch name + id: current_branch + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT" + - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed --config .github/ct.yaml) + changed=$(ct list-changed --config .github/ct.yaml --target-branch ${{ steps.current_branch.outputs.branch }}) if [[ -n "${changed}" ]]; then echo "changed=true" >> "$GITHUB_OUTPUT" fi - - name: Current branch name - id: current_branch - run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT" - - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' run: ct lint --config .github/ct.yaml --target-branch ${{ steps.current_branch.outputs.branch }}