mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
ci: Fix concurrency settings to allow parallel workflows on develop branch (#2391)
Updates the GitHub Actions workflow concurrency configuration to allow
parallel execution of workflows on the `develop` branch while
maintaining cancellation behavior for other branches.
## Problem
Previously, all workflow runs were subject to cancellation when new
commits were pushed to the same branch (`cancel-in-progress: true`).
This caused issues on the `develop` branch where important CI runs could
be prematurely cancelled, potentially missing critical feedback on the
main development branch.
## Solution
Modified the `concurrency` settings in `.github/workflows/build.yml` to
use separate concurrency groups and conditional cancellation:
```yaml
concurrency:
# Use separate concurrency groups for develop vs other branches to prevent cross-cancellation
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/develop' && github.run_number || 'branch' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
```
## Behavior
- **`develop` branch**: Each run gets its own concurrency group (using
`run_number`), allowing parallel execution without cancellation or
queuing delays
- **All other branches**: Shared concurrency group with
`cancel-in-progress: true` - workflows are cancelled when new commits
are pushed
This ensures that the `develop` branch can run multiple workflows in
parallel without interference while still providing the efficiency
benefits of workflow cancellation on feature branches and pull requests.
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
Co-authored-by: mathbunnyru <12270691+mathbunnyru@users.noreply.github.com>
This commit is contained in:
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -28,8 +28,9 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
|
# Develop branch: Each run gets unique group (using run_number) for parallel execution
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
# Other branches: Shared group with cancel-in-progress to stop old runs when new commits are pushed
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/develop' && github.run_number || 'branch' }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
Reference in New Issue
Block a user