Skip to content

Commit acb6766

Browse files
ci(workflows): [chore] migrate integration-sqlite to central changes filter
Also an example of how to use a workflow-level `extra-changes` to add workflow-level customized filtering where needed/desirable. Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 16be65c commit acb6766

1 file changed

Lines changed: 9 additions & 17 deletions

File tree

.github/workflows/integration-sqlite.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,27 @@ concurrency:
1919

2020
jobs:
2121
changes:
22-
runs-on: ubuntu-latest-low
22+
uses: ./.github/workflows/detect-changes.yml
2323

24+
extra-changes:
25+
runs-on: ubuntu-latest-low
2426
outputs:
25-
src: ${{ steps.changes.outputs.src}}
26-
27+
integration: ${{ steps.changes.outputs.integration }}
2728
steps:
2829
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
2930
id: changes
3031
continue-on-error: true
3132
with:
3233
filters: |
33-
src:
34-
- '.github/workflows/**'
35-
- '3rdparty/**'
36-
- '**/*.php'
37-
- '**/lib/**'
38-
- '**/tests/**'
39-
- '**/vendor-bin/**'
34+
integration:
4035
- 'build/integration/**'
41-
- '.php-cs-fixer.dist.php'
42-
- 'composer.json'
43-
- 'composer.lock'
4436
- 'core/shipped.json'
4537
4638
integration-sqlite:
4739
runs-on: ubuntu-latest
4840

49-
needs: changes
50-
if: needs.changes.outputs.src != 'false'
41+
needs: [changes, extra-changes]
42+
if: needs.changes.outputs.php != 'false' || needs.extra-changes.outputs.integration != 'false'
5143

5244
strategy:
5345
fail-fast: false
@@ -173,12 +165,12 @@ jobs:
173165
permissions:
174166
contents: none
175167
runs-on: ubuntu-latest-low
176-
needs: [changes, integration-sqlite]
168+
needs: [changes, extra-changes, integration-sqlite]
177169

178170
if: always()
179171

180172
name: integration-sqlite-summary
181173

182174
steps:
183175
- name: Summary status
184-
run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-sqlite.result != 'success' }}; then exit 1; fi
176+
run: if ${{ needs.changes.outputs.php != 'false' && needs.extra-changes.outputs.integration && needs.integration-sqlite.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)