Skip to content

Commit 237248b

Browse files
fix: sync step now correctly detects and pushes upstream merge
1 parent 46df1eb commit 237248b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/translate-digest.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,18 @@ jobs:
2626

2727
- name: Sync from upstream (duanyytop/agents-radar)
2828
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
2931
git remote add upstream https://github.com/duanyytop/agents-radar.git || true
3032
git fetch upstream master
33+
LOCAL=$(git rev-parse HEAD)
3134
git merge upstream/master --no-edit --allow-unrelated-histories || true
32-
33-
- name: Commit upstream sync
34-
run: |
35-
git config user.name "github-actions[bot]"
36-
git config user.email "github-actions[bot]@users.noreply.github.com"
37-
git add -A
38-
if ! git diff --cached --quiet; then
39-
git commit -m "sync: merge upstream"
40-
git pull --rebase
35+
AFTER=$(git rev-parse HEAD)
36+
if [ "$LOCAL" != "$AFTER" ]; then
37+
echo "Upstream merged — pushing..."
4138
git push
39+
else
40+
echo "Already up to date with upstream."
4241
fi
4342
4443
- name: Determine target date

0 commit comments

Comments
 (0)