Skip to content

Commit a90b8df

Browse files
authored
ci(showcase): use separate filter job for version check (#13770)
The `check-version` job in showcase is not running in PRs that do not modify the specific paths. Update the job to use a filter job to skip the job on non-relevant PRs. Example: #13558
1 parent 9f8572a commit a90b8df

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

‎.github/workflows/showcase-version-check.yaml‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,28 @@ on:
2222
- cron: '30 3 * * *' # Run daily at 3:30 AM UTC
2323
workflow_dispatch: # Allow manual trigger
2424
pull_request:
25-
paths:
26-
- 'librarian.yaml'
27-
- 'java-showcase/gapic-showcase/pom.xml'
28-
- '.github/workflows/showcase-version-check.yaml'
2925

3026
jobs:
31-
check-version:
27+
filter:
28+
runs-on: ubuntu-latest
29+
outputs:
30+
should_run: ${{ steps.filter.outputs.should_run }}
31+
steps:
32+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
33+
with:
34+
persist-credentials: false
35+
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
36+
id: filter
37+
with:
38+
filters: |
39+
should_run:
40+
- 'librarian.yaml'
41+
- 'java-showcase/gapic-showcase/pom.xml'
42+
- '.github/workflows/showcase-version-check.yaml'
43+
44+
check-showcase-version:
45+
needs: filter
46+
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.filter.outputs.should_run == 'true' }}
3247
runs-on: ubuntu-latest
3348
permissions:
3449
issues: write

0 commit comments

Comments
 (0)