Skip to content

Commit

Permalink
[skip circleci] Add option to effectively cancel prev runs (#2310)
Browse files Browse the repository at this point in the history
* Add option to cancel prev runs

Without using skip-duplicate-actions which is failing due to github access permission. 
See fkirc/skip-duplicate-actions#103

* Cancel by branch *and* workflow

Without it will cancel other workflows for the same branch
Credits: 7b371e8b

* Disable cancelling other runs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
jneira and mergify[bot] authored Oct 30, 2021
1 parent b018717 commit ebe1d92
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ defaults:
run:
shell: bash

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
pull_request:
branches:
Expand All @@ -19,12 +24,13 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
cancel_others: true
cancel_others: false
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml"]'
# If we only change ghcide downstream packages we have not test ghcide itself
- id: skip_ghcide_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
cancel_others: false
paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]'
- if: steps.skip_check.outputs.should_skip == 'true'
name: Skip circleci
Expand Down

0 comments on commit ebe1d92

Please sign in to comment.