Skip to content

Commit 2d7bb1e

Browse files
committed
ci: harden EasyLibrary sync
1 parent 6d13252 commit 2d7bb1e

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/sync-to-easylibrary.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,20 @@ jobs:
4040
cd easylibrary
4141
git config user.name "github-actions[bot]"
4242
git config user.email "github-actions[bot]@users.noreply.github.com"
43-
if git diff --quiet && git diff --cached --quiet; then
43+
git add src/imperazim/form/
44+
if git diff --cached --quiet; then
4445
echo "No changes to sync"
4546
exit 0
4647
fi
47-
git add src/imperazim/form/
4848
git commit -m "[sync] Update embedded LibForm from standalone"
49-
git push
49+
for attempt in 1 2 3 4 5; do
50+
if git push origin development; then
51+
exit 0
52+
fi
53+
if [ "$attempt" -eq 5 ]; then
54+
exit 1
55+
fi
56+
git fetch origin development
57+
git rebase origin/development
58+
sleep $((attempt * 2))
59+
done

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The format is inspired by Keep a Changelog and uses semantic versioning where po
2222

2323
- PHPStan now runs correctly through the Composer quality script on Windows.
2424
- Removed unused persisted constructor state while preserving the public form APIs.
25+
- Sync workflow now stages files before checking diffs and retries/rebases pushes to EasyLibrary.
2526

2627
## [2.0.0] - TBD
2728

0 commit comments

Comments
 (0)