Skip to content

Commit ad19f63

Browse files
rathbomaclaude
andcommitted
Add concurrency control to GitHub Actions workflows
Add concurrency groups to prevent duplicate workflow runs: - Automatically cancel in-progress runs when new commits are pushed - Each workflow has its own concurrency group per branch/PR - Prevents wasted CI resources on outdated commits - Ensures only the most recent commit is tested Also re-enable push to main trigger for both workflows with workflow_dispatch for manual triggering. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 1e86041 commit ad19f63

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/lint.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
name: Lint
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
workflow_dispatch: # Allow manual triggering
9+
10+
# Cancel in-progress runs when a new commit is pushed
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
814

915
jobs:
1016
lint:

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
name: Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
workflow_dispatch: # Allow manual triggering
9+
10+
# Cancel in-progress runs when a new commit is pushed
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
814

915
jobs:
1016
test:

0 commit comments

Comments
 (0)