diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index b4f5725ff57..a45d8fbec39 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -1,22 +1,40 @@ name: Lint and Test Charts -on: pull_request - +on: + pull_request: + branches: + - main jobs: lint-test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 - - name: Fetch history - run: git fetch --prune --unshallow + - name: Set up Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 - - name: Run chart-testing (lint) - id: lint - uses: helm/chart-testing-action@v1.0.0 + - uses: actions/setup-python@v2 with: - command: lint + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.0.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch main) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --target-branch main - name: Create kind cluster uses: helm/kind-action@v1.0.0 @@ -24,6 +42,4 @@ jobs: if: steps.lint.outputs.changed == 'true' - name: Run chart-testing (install) - uses: helm/chart-testing-action@v1.0.0 - with: - command: install + run: ct install --target-branch main diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1258a60f14c..0ad51d77905 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,7 +3,7 @@ name: Release Charts on: push: branches: - - master + - main jobs: release: