Skip to content

Commit 8631efb

Browse files
authored
ci: cancel previous runs when new commits are pushed (#299)
this is to optimize and save long running CI if you are pushing to branch constantly.
1 parent bddf26f commit 8631efb

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

.github/workflows/ci-cd-production.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17+
- name: Cancel Previous Runs
18+
uses: styfle/[email protected]
19+
with:
20+
access_token: ${{ github.token }}
21+
1722
- name: Checkout the repo
1823
uses: actions/checkout@v2
1924

.github/workflows/ci-cd-pull-request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ jobs:
1010
if: contains(github.head_ref, 'crowdin') == false
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Cancel Previous Runs
14+
uses: styfle/[email protected]
15+
with:
16+
access_token: ${{ github.token }}
17+
1318
- name: Checkout the repo
1419
uses: actions/checkout@v2
1520

.github/workflows/ci-cd-staging.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717
steps:
18+
- name: Cancel Previous Runs
19+
uses: styfle/[email protected]
20+
with:
21+
access_token: ${{ github.token }}
22+
1823
- name: Checkout the repo
1924
uses: actions/checkout@v2
2025

.github/workflows/website-integrity.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
website-check:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Cancel Previous Runs
13+
uses: styfle/[email protected]
14+
with:
15+
access_token: ${{ github.token }}
16+
1217
- name: Checkout
1318
uses: actions/checkout@v3
1419
- name: Fetch

0 commit comments

Comments
 (0)