mirror of
https://github.com/vercel/commerce.git
synced 2025-03-31 01:05:53 +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
|
name: test
|
||||||
on: pull_request
|
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:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Cancel running workflows
|
|
||||||
uses: styfle/cancel-workflow-action@0.12.0
|
|
||||||
with:
|
|
||||||
access_token: ${{ github.token }}
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Set node version
|
- name: Set node version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user