diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41b9074398..832c94a990 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,11 +2,28 @@ name: Phing CI on: push: - pull_request_target: pull_request: jobs: + pre_job: + # continue-on-error: true # Uncomment once integration is finished + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + # All of these options are optional, so you can remove them if you are happy with the defaults + concurrent_skipping: 'never' + skip_after_successful_duplicate: 'true' + paths_ignore: '["**/README.md", "**/docs/**"]' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' + static_code_analysis: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -21,7 +38,9 @@ jobs: test: needs: + - pre_job - static_code_analysis + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ${{ matrix.operating-system }} strategy: fail-fast: true @@ -58,7 +77,9 @@ jobs: build_phar: runs-on: ubuntu-latest needs: + - pre_job - test + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} steps: - uses: actions/checkout@v2 name: Checkout repository @@ -93,7 +114,9 @@ jobs: coverage: runs-on: ubuntu-latest needs: + - pre_job - static_code_analysis + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} steps: - name: Checkout repository uses: actions/checkout@v2