diff --git a/.github/workflows/generate-chart-readme.yaml b/.github/workflows/generate-chart-readme.yaml index 84c78f4..4dab0bf 100644 --- a/.github/workflows/generate-chart-readme.yaml +++ b/.github/workflows/generate-chart-readme.yaml @@ -4,6 +4,7 @@ on: pull_request: branches: - main + - dev permissions: {} # Remove all permissions by default diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6896ad0..c490c4c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -4,6 +4,7 @@ on: pull_request: branches: - main + - dev jobs: lint-test: @@ -30,11 +31,17 @@ jobs: - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config ct.yaml) + changed=$(ct list-changed --target-branch ${{ github.base_ref }} --config ct.yaml) if [[ -n "$changed" ]]; then echo "changed=true" >> "$GITHUB_OUTPUT" fi - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --lint-conf lintconf.yaml --config ct.yaml + run: | + ARGS="--target-branch ${{ github.base_ref }} --lint-conf lintconf.yaml --config ct.yaml" + # Add an additional argument if the base branch is 'dev' + if [ "${{ github.base_ref }}" == "dev" ]; then + ARGS="$ARGS --check-version-increment false" + fi + ct lint $ARGS