mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 06:32:32 +00:00
Use GitHub actions concurrency to cancel in progress workflows on PRs (#1232)
This commit is contained in:
parent
2448f5201c
commit
2fe1527bea
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user