Skip to content

Commit b4e511d

Browse files
smilexthclaude
andcommitted
Fix workflow race conditions and add conflict handling
- Set max-parallel: 1 to prevent simultaneous pushes - Add git pull --rebase before push to handle conflicts - This should resolve the 'cannot lock ref' error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 508eff0 commit b4e511d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/mono_repo_publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
zb: [zb01, zb02, zb03, zb04, zb05, zb06, zb07, zb08, zb09, zb10, zigbee2mqtt-edge, zigbee2mqtt-proxy, common]
12+
max-parallel: 1
1213
steps:
1314
- name: Checkout source repository
1415
uses: actions/checkout@v3
@@ -38,6 +39,8 @@ jobs:
3839
echo "No changes to commit for ${{ matrix.zb }}"
3940
else
4041
git commit -m "${{ matrix.zb }} has been updated from legacy codebase"
42+
# Pull latest changes before pushing to avoid conflicts
43+
git pull origin main --rebase
4144
git push origin main
4245
echo "Successfully pushed ${{ matrix.zb }} updates"
4346
fi

0 commit comments

Comments
 (0)