feature(onpr-job): Do not execute unless app/** has changes
@@ -4,7 +4,35 @@ on:
pull_request
jobs:
+ # JOB to run change detection
+ changes:
+ runs-on: ubuntu-latest
+ # Set job outputs to values from filter step
+ outputs:
+ app: ${{ steps.filter.outputs.app }}
+ docs: ${{ steps.filter.outputs.docs }}
+ ui: ${{ steps.filter.outputs.ui }}
+ steps:
+ # For pull requests it's not necessary to checkout the code
+ - uses: dorny/paths-filter@v2
+ id: filter
+ with:
+ # Added all possible filters even if we just use app and ui
+ filters: |
+ app:
+ - 'app/**'
+ docs:
+ - 'doc/**'
+ ui:
+ - 'app/ui-react/**'
+ - 'package.json'
+ - 'yarn.lock'
+ - 'node_modules/**'
+
+
full-pr-build:
+ needs: changes
+ if: ${{ needs.changes.outputs.app == 'true' || needs.changes.outputs.ui == 'true' }}
runs-on: ubuntu-latest
env:
IMAGES_DIR: syndesis_images
