From 71424817a9dcc387b2cf2319c74213e8ac7ee2f6 Mon Sep 17 00:00:00 2001 From: Stanislav Khalash Date: Wed, 18 Sep 2024 11:13:48 +0200 Subject: [PATCH] Replace changed-files with path-filter --- .github/workflows/pr-code-checks.yml | 42 ++++----------------------- .github/workflows/pr-integration.yml | 43 ++++------------------------ .github/workflows/pr-lifecycle.yml | 34 ++++------------------ 3 files changed, 18 insertions(+), 101 deletions(-) diff --git a/.github/workflows/pr-code-checks.yml b/.github/workflows/pr-code-checks.yml index 1721abf46..03c02cc79 100644 --- a/.github/workflows/pr-code-checks.yml +++ b/.github/workflows/pr-code-checks.yml @@ -5,41 +5,20 @@ on: branches: - "main" - "release-*" + paths-ignore: + - 'docs/**' + - 'dependencies/**' + - '**/*.md' + - 'OWNERS' + - 'CODEOWNERS' workflow_dispatch: env: GITLEAKS_VERSION: 8.18.2 jobs: - # This is a workaround to bypass the limitations of the workflow path filter: - # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks - check-changed-files: - outputs: - check: ${{ steps.changed-files.outputs.any_modified }} - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.draft == false }} - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Get changed files - uses: tj-actions/changed-files@6b2903bdce6310cfbddd87c418f253cf29b2dec9 - id: changed-files - with: - files_ignore: | - docs/** - **/*.md - OWNERS - CODEOWNERS - - - name: List changed files - run: echo '${{ steps.changed-files.outputs.all_changed_files }}' >> $GITHUB_STEP_SUMMARY - unit-tests: runs-on: ubuntu-latest - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} steps: - name: Checkout repo uses: actions/checkout@v4 @@ -52,9 +31,6 @@ jobs: lint: runs-on: ubuntu-latest - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} steps: - name: Checkout repo uses: actions/checkout@v4 @@ -67,9 +43,6 @@ jobs: coverage: runs-on: ubuntu-latest - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} steps: - name: Checkout repo uses: actions/checkout@v4 @@ -82,9 +55,6 @@ jobs: gitleaks: runs-on: ubuntu-latest - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/pr-integration.yml b/.github/workflows/pr-integration.yml index 65c37bd4a..7b78ed04a 100644 --- a/.github/workflows/pr-integration.yml +++ b/.github/workflows/pr-integration.yml @@ -8,38 +8,16 @@ on: branches: - "main" - "release-*" + paths-ignore: + - 'docs/**' + - 'dependencies/**' + - '**/*.md' + - 'OWNERS' + - 'CODEOWNERS' workflow_dispatch: jobs: - # This is a workaround to bypass the limitations of the workflow path filter: - # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks - check-changed-files: - outputs: - check: ${{ steps.changed-files.outputs.any_modified }} - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.draft == false }} - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Get changed files - uses: tj-actions/changed-files@6b2903bdce6310cfbddd87c418f253cf29b2dec9 - id: changed-files - with: - files_ignore: | - docs/** - dependencies/** - **/*.md - OWNERS - CODEOWNERS - - - name: List changed files - run: echo '${{ steps.changed-files.outputs.all_changed_files }}' >> $GITHUB_STEP_SUMMARY - e2e: - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} strategy: fail-fast: false matrix: @@ -72,9 +50,6 @@ jobs: job-name: ${{ github.job }}-${{ matrix.ginkgo-labels }} e2e-dev: - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} strategy: fail-fast: false matrix: @@ -103,9 +78,6 @@ jobs: job-name: ${{ github.job }}-${{ matrix.ginkgo-labels }} e2e-istio: - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} runs-on: ubuntu-latest steps: - name: Checkout repo @@ -132,9 +104,6 @@ jobs: job-name: ${{ github.job }} e2e-self-mon: - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/pr-lifecycle.yml b/.github/workflows/pr-lifecycle.yml index 1267498cf..9108535fc 100644 --- a/.github/workflows/pr-lifecycle.yml +++ b/.github/workflows/pr-lifecycle.yml @@ -5,38 +5,16 @@ on: branches: - "main" - "release-*" + paths-ignore: + - 'docs/**' + - 'dependencies/**' + - '**/*.md' + - 'OWNERS' + - 'CODEOWNERS' workflow_dispatch: jobs: - # This is a workaround to bypass the limitations of the workflow path filter: - # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks - check-changed-files: - outputs: - check: ${{ steps.changed-files.outputs.any_modified }} - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.draft == false }} - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Get changed files - uses: tj-actions/changed-files@6b2903bdce6310cfbddd87c418f253cf29b2dec9 - id: changed-files - with: - files_ignore: | - docs/** - dependencies/** - **/*.md - OWNERS - CODEOWNERS - - - name: List changed files - run: echo '${{ steps.changed-files.outputs.all_changed_files }}' >> $GITHUB_STEP_SUMMARY - manager-upgrade: - needs: - - check-changed-files - if: ${{ needs.check-changed-files.outputs.check == 'true' }} runs-on: ubuntu-latest steps: - name: Checkout repo