Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Replace changed-files with path-filter #1460

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 6 additions & 36 deletions .github/workflows/pr-code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
43 changes: 6 additions & 37 deletions .github/workflows/pr-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
34 changes: 6 additions & 28 deletions .github/workflows/pr-lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading