Fix GitHub Actions sync failure with upstream due to merge conflicts in fastlane/Fastfile #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The GitHub Actions workflow was consistently failing when attempting to sync upstream changes from LoopKit/LoopWorkspace due to merge conflicts in
fastlane/Fastfile
:This prevented the repository from staying synchronized with important updates from the upstream LoopKit repository, breaking the automated build and sync process.
Root Cause
The
aormsby/[email protected]
action cannot handle merge conflicts automatically. When the upstream repository updates files likefastlane/Fastfile
with formatting changes, documentation updates, or structural modifications that conflict with the fork's version, the sync fails completely.Solution
This PR replaces the failing sync action with custom bash scripts that intelligently handle merge conflicts:
🔧 Custom Sync Scripts
Scripts/sync_with_upstream.sh
- Main sync script with automatic conflict resolutionScripts/check_upstream_changes.sh
- Lightweight upstream change detection🎯 Conflict Resolution Strategy
The scripts automatically resolve conflicts by taking upstream versions for:
fastlane/Fastfile
- Ensures latest Loop build process compatibility.github/workflows/*
- Gets latest workflow improvementsGemfile
,Gemfile.lock
- Maintains current dependencies🔄 GitHub Actions Integration
UPSTREAM_REPO
,UPSTREAM_BRANCH
,TARGET_BRANCH
,GH_PAT
)has_new_commits
output for existing workflow logicTesting
Comprehensive testing confirmed the solution works correctly:
fastlane/Fastfile
conflictsResult
The automated sync process now works reliably even with merge conflicts, ensuring the fork stays synchronized with upstream LoopKit/LoopWorkspace updates while maintaining the automated build functionality.
Before: Sync failures blocked all automation
After: Intelligent conflict resolution keeps sync working automatically
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.