Skip to content

Commit

Permalink
Use GitHub actions concurrency to cancel in progress workflows on PRs (
Browse files Browse the repository at this point in the history
  • Loading branch information
bensijons authored and bc-alexsaiannyi committed Dec 7, 2023
1 parent 5c2914e commit 7873e6c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: test
on: pull_request

# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Cancel running workflows
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Set node version
Expand Down

0 comments on commit 7873e6c

Please sign in to comment.