mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #59323 from nextcloud/jtr/ci-path-filter-rector
ci: add path filtering to rector workflow
This commit is contained in:
commit
f34d7bef6a
1 changed files with 39 additions and 1 deletions
40
.github/workflows/rector.yml
vendored
40
.github/workflows/rector.yml
vendored
|
|
@ -13,10 +13,34 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest-low
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src}}
|
||||
|
||||
steps:
|
||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
- '.github/workflows/**'
|
||||
- '3rdparty/**'
|
||||
- '**/lib/**'
|
||||
- '**/tests/**'
|
||||
- '**/vendor-bin/**'
|
||||
- '.php-cs-fixer.dist.php'
|
||||
- 'composer.json'
|
||||
- 'composer.lock'
|
||||
- '**.php'
|
||||
|
||||
strict:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: ${{ github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -43,3 +67,17 @@ jobs:
|
|||
- name: Show changes
|
||||
if: always()
|
||||
run: git diff --exit-code -- . ':!lib/composer'
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest-low
|
||||
needs: [changes, strict]
|
||||
|
||||
if: always()
|
||||
|
||||
name: rector-summary
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.strict.result != 'success' }}; then exit 1; fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue