ci: more path filtering, path filtering happens in pre-job so all jobs can be required (#12260)

ci: don't use gha path filtering, use a pre-job to skip instead, add path filtering to more workflows
This commit is contained in:
Zack Pollard
2024-09-03 13:23:39 +01:00
committed by GitHub
parent cb903db308
commit 441b009a0b
6 changed files with 265 additions and 48 deletions

View File

@@ -10,8 +10,27 @@ concurrency:
cancel-in-progress: true
jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.found_paths.outputs.mobile == 'true' || steps.should_force.outputs.should_force == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: found_paths
uses: dorny/paths-filter@v3
with:
filters: |
mobile:
- 'mobile/**'
- name: Check if we should force jobs to run
id: should_force
run: echo "should_force=${{ github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
mobile-dart-analyze:
name: Run Dart Code Analysis
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run == 'true' }}
runs-on: ubuntu-latest