Skip to content

Commit 2e4f5e8

Browse files
committed
feat: add concurrency control to GitHub Actions workflows
- Cancel previous CI runs when new commits are pushed to same branch/PR - Cancel previous release runs when multiple tags are pushed - Saves CI resources and provides faster feedback - Uses workflow name + git ref as concurrency group identifier
1 parent 0aba39c commit 2e4f5e8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
branches: [main, develop]
88

9+
# Cancel previous runs for the same workflow on the same branch/PR
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
914
env:
1015
GO_VERSION: "1.24"
1116

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
tags:
66
- "v*"
77

8+
# Cancel previous runs for the same workflow on the same tag
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
813
env:
914
GO_VERSION: "1.24"
1015

0 commit comments

Comments
 (0)