Skip to content

Commit

Permalink
Improve concurrency of GitHub Actions (#1128)
Browse files Browse the repository at this point in the history
* 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

* empty commit to trigger cancellation of previous commit
  • Loading branch information
RobinMalfait committed Feb 21, 2022
1 parent 2139939 commit 8b2bfc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Expand Up @@ -2,6 +2,10 @@ name: CI

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
NODE_VERSION: 12.x

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-insiders.yml
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 8b2bfc4

Please sign in to comment.