Skip to content

Commit 3fc1009

Browse files
Fix sync workflow to only trigger on v12.0 pushes and add concurrency control (#827)
## Problem The current sync workflow triggers on pushes to both `v12.0` and `v13.0` branches but always merges `v12.0` → `v13.0` regardless of which branch triggered it. This causes: - **Redundant runs** when pushing to `v13.0` (since it doesn't need to sync anywhere) - **Noisy executions** that provide no value - **Potential race conditions** from concurrent sync operations The goal is one-way forward sync only: changes to `v12.0` should merge into `v13.0`, but changes to `v13.0` should not trigger the workflow. ## Solution Updated `.github/workflows/sync-version-branches.yml` to implement proper one-way sync: ### Key Changes 1. **Refined triggers**: Now only triggers on pushes to `v12.0` branch (removed `v13.0`) 2. **Manual dispatch**: Added `workflow_dispatch` for manual runs when needed 3. **Concurrency control**: Added concurrency group `sync-v12-to-v13` with `cancel-in-progress: true` to prevent overlapping operations 4. **Improved clarity**: Updated names to clearly indicate the sync direction - Workflow: "Sync v12.0 -> v13.0" - Step: "Keep v13.0 in sync with v12.0" ### Preserved Settings - ✅ Same action version (`jojomatik/[email protected]`) - ✅ Same merge strategy and conflict resolution settings - ✅ Same bot credentials and GitHub token usage ## Benefits - **Eliminates noise**: No more unnecessary runs on `v13.0` pushes - **Prevents conflicts**: Concurrency control ensures operations don't interfere - **Maintains pattern**: Clean one-way forward sync from older to newer versions - **Manual control**: Allows manual triggering when needed ## Testing - Validated YAML syntax and structure - Confirmed compatibility with GitHub Actions workflow schema - Verified all required fields and job configurations are present - Follows existing repository YAML formatting standards After merging, pushes to `v12.0` will trigger the sync to `v13.0`, while pushes to `v13.0` will not trigger any sync operations. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/IntelliTect/EssentialCSharp/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BenjaminMichaelis <[email protected]>
1 parent c5c6a17 commit 3fc1009

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
name: Sync branches
1+
name: Sync v12.0 -> v13.0
22
on:
33
push:
4-
branches: [ 'v12.0', 'v13.0' ]
4+
branches:
5+
- 'v12.0'
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: sync-v12-to-v13
10+
cancel-in-progress: true
511

612
jobs:
713
sync_branches:
814
name: Sync Branches
915
runs-on: ubuntu-latest
1016
steps:
11-
- name: Keep branches in sync
17+
- name: Keep v13.0 in sync with v12.0
1218
uses: jojomatik/[email protected]
1319
with:
1420
source: "v12.0"
@@ -17,7 +23,4 @@ jobs:
1723
resolve_conflicts: "false"
1824
git_committer_name: 'BenjaminMichaelisBot'
1925
git_committer_email: '[email protected]'
20-
# The access token to push to the repository
21-
# Optional
22-
# Default: github.token
23-
github_token: ${{ secrets.GIT_PUSHTOKEN }}
26+
github_token: ${{ secrets.GIT_PUSHTOKEN }}

0 commit comments

Comments
 (0)