Skip to content

Commit b0f0b6a

Browse files
committed
improve concurrency of GitHub Actions
This will allow you to cancel older running actions for the current PR / branch. This saves you some resources, but more importantly hopefully frees up some spots in the queue a bit faster. Saw this on the Node.js repo: nodejs/node#42017
1 parent 5deddef commit b0f0b6a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: CI
22

33
on: [push]
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
59
env:
610
NODE_VERSION: 12.x
711

.github/workflows/release-insiders.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches: [main]
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)