Skip to content

Commit f34d7be

Browse files
authored
Merge pull request #59323 from nextcloud/jtr/ci-path-filter-rector
ci: add path filtering to rector workflow
2 parents 83e464c + 7ccc7a6 commit f34d7be

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

.github/workflows/rector.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,34 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
changes:
17+
runs-on: ubuntu-latest-low
18+
19+
outputs:
20+
src: ${{ steps.changes.outputs.src}}
21+
22+
steps:
23+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
24+
id: changes
25+
continue-on-error: true
26+
with:
27+
filters: |
28+
src:
29+
- '.github/workflows/**'
30+
- '3rdparty/**'
31+
- '**/lib/**'
32+
- '**/tests/**'
33+
- '**/vendor-bin/**'
34+
- '.php-cs-fixer.dist.php'
35+
- 'composer.json'
36+
- 'composer.lock'
37+
- '**.php'
38+
1639
strict:
1740
runs-on: ubuntu-latest
1841

19-
if: ${{ github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}
42+
needs: changes
43+
if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}
2044

2145
steps:
2246
- name: Checkout
@@ -43,3 +67,17 @@ jobs:
4367
- name: Show changes
4468
if: always()
4569
run: git diff --exit-code -- . ':!lib/composer'
70+
71+
summary:
72+
permissions:
73+
contents: none
74+
runs-on: ubuntu-latest-low
75+
needs: [changes, strict]
76+
77+
if: always()
78+
79+
name: rector-summary
80+
81+
steps:
82+
- name: Summary status
83+
run: if ${{ needs.changes.outputs.src != 'false' && needs.strict.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)