Skip to content

Commit 36ce03a

Browse files
committed
Changed anti ping pong to use commit msg, added --rebase to git pull, moved after commit to narrow race win
1 parent 8cd9153 commit 36ce03a

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/sync-changes-to-repos.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
if: (github.repository == 'KudoAI/googlegpt') && (github.event.commits[0].committer.username != 'kudo-sync-bot')
10+
if: (github.repository == 'KudoAI/googlegpt') && !contains(github.event.head_commit.message, '[auto-sync]')
1111
runs-on: ubuntu-24.04
1212
permissions:
1313
contents: read
@@ -109,20 +109,21 @@ jobs:
109109
if: env.SYNC_SRC
110110
run: |
111111
cd ${{ github.workspace }}/KudoAI/googlegpt
112-
git add .
113-
git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from $SYNC_SRC/]" || true
112+
git add . && git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from $SYNC_SRC/]" || true
113+
git pull --rebase
114114
git push
115115
116116
- name: Push changes to adamlui/ai-web-extensions
117117
run: |
118118
cd ${{ github.workspace }}/adamlui/ai-web-extensions
119-
git add .
120-
git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from https://github.com/KudoAI/googlegpt]" || true
119+
git add . && git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from https://github.com/KudoAI/googlegpt]" || true
120+
git pull --rebase
121121
git push
122122
123+
123124
- name: Push changes to adamlui/userscripts
124125
run: |
125126
cd ${{ github.workspace }}/adamlui/userscripts
126-
git add .
127-
git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from https://github.com/KudoAI/googlegpt]" || true
127+
git add . && git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from https://github.com/KudoAI/googlegpt]" || true
128+
git pull --rebase
128129
git push

0 commit comments

Comments
 (0)