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 Nov 10, 2023
1 parent 2448f52 commit 2fe1527
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

1 comment on commit 2fe1527

@vercel
Copy link

@vercel vercel bot commented on 2fe1527 Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.