Commit 070c8f7
authored
ci: allow github action parallel run on main (on release we have 2) (#1431)
# Fix: Prevent Workflow Cancellation on Main Branch
## Problem
When PRs were merged to main, the workflow was being cancelled:
- PR squashed commit triggered the `Test, Build & Release` workflow
- Semantic-release created a new commit with `[skip_actions]`
- CodeQL workflow still ran for the semantic-release commit
- GitHub Actions cancelled the PR workflow due to concurrency conflicts
with message: `Canceling since a higher priority waiting request for
Test, Build & Release-refs/heads/main exists`
## Solution
Updated `.github/workflows/build_test_and_release.yml` concurrency
configuration:
```yaml
concurrency:
group: build-test-release-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
```
**Changes:**
- Use hardcoded concurrency group name to isolate this workflow from
CodeQL and other workflows
- Disable `cancel-in-progress` for main branch to allow both PR merge
and semantic-release commits to complete
- Keep cancellation enabled for feature branches to prevent redundant
runs
## Result
✅ PR merge commits complete their full workflow run (setup → test →
build → release)
✅ No more workflow cancellations on main branch
✅ CodeQL and other workflows run independently without interference
## What type of PR is this? (check all applicable)
- [ ] 💡 (feat) - A new feature (non-breaking change which adds
functionality)
- [ ] 🔄 (refactor) - Code Refactoring - A code change that neither fixes
a bug nor adds a feature
- [x] 🐞 (fix) - Bug Fix (non-breaking change which fixes an issue)
- [ ] 🏎 (perf) - Optimization
- [ ] 📄 (docs) - Documentation - Documentation only changes
- [ ] 📄 (test) - Tests - Adding missing tests or correcting existing
tests
- [ ] ⚙️ (ci) - Continuous Integrations - Changes to our CI
configuration files and scripts (example scopes: Travis, Circle,
BrowserStack, SauceLabs)
- [ ] ☑️ (chore) - Chores - Other changes that don't modify src or test
files
- [ ] ↩️ (revert) - Reverts - Reverts a previous commit(s).
<!--
For a timely review/response, please avoid force-pushing additional
commits if your PR already received reviews or comments.
Before submitting a Pull Request, please ensure you've done the
following:
- 👷♀️ Create small PRs. In most cases this will be possible.
- ✅ Provide tests for your changes.
- 📝 Use descriptive commit messages (as described below).
- 📗 Update any related documentation and include any relevant
screenshots.
Commit Message Structure (all lower-case):
<type>(optional ticket number): <description>
[optional body]
-->1 parent 5881a65 commit 070c8f7
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments