CI: Trigger Job if their source file has changes

This commit is contained in:
Arthur Jamet
2024-01-07 08:53:35 +01:00
committed by Clément Le Bihan
parent e769ff1f13
commit 1880b89b0c
3 changed files with 11 additions and 2 deletions

View File

@@ -23,10 +23,13 @@ jobs:
filters: | filters: |
back: back:
- 'back/**' - 'back/**'
- '.github/workflows/back.yml'
front: front:
- 'front/**' - 'front/**'
- '.github/workflows/front.yml'
scorometer: scorometer:
- 'scorometer/**' - 'scorometer/**'
- '.github/workflows/scoro.yml'
back_build: back_build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
@@ -47,7 +50,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
needs: [ back_build ] needs: [ back_build ]
if: ${{ needs.changes.outputs.frontend == 'true' }} if: ${{ needs.changes.outputs.back == 'true' }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@@ -23,10 +23,13 @@ jobs:
filters: | filters: |
back: back:
- 'back/**' - 'back/**'
- '.github/workflows/back.yml'
front: front:
- 'front/**' - 'front/**'
- '.github/workflows/front.yml'
scorometer: scorometer:
- 'scorometer/**' - 'scorometer/**'
- '.github/workflows/scoro.yml'
front_check: front_check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
@@ -54,7 +57,7 @@ jobs:
defaults: defaults:
run: run:
working-directory: ./front working-directory: ./front
if: ${{ needs.changes.outputs.frontend == 'true' }} if: ${{ needs.changes.outputs.front == 'true' }}
needs: [ front_check ] needs: [ front_check ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View File

@@ -22,10 +22,13 @@ jobs:
filters: | filters: |
back: back:
- 'back/**' - 'back/**'
- '.github/workflows/back.yml'
front: front:
- 'front/**' - 'front/**'
- '.github/workflows/front.yml'
scorometer: scorometer:
- 'scorometer/**' - 'scorometer/**'
- '.github/workflows/scoro.yml'
scoro_test: scoro_test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: changes needs: changes