diff --git a/.github/workflows/run-sync-script.yaml b/.github/workflows/run-sync-script.yaml index 7438b7a7..4ac14ea0 100644 --- a/.github/workflows/run-sync-script.yaml +++ b/.github/workflows/run-sync-script.yaml @@ -49,18 +49,18 @@ jobs: FIRST_NAME="Max" DOMAIN="gmail.com" EMAIL="${FIRST_NAME}BaseCode@${DOMAIN}" - + git config --global user.email "$EMAIL" git config --global user.name "Max Base (GitHub Actions)" - + git checkout -b auto-sync-update || git checkout auto-sync-update - - git fetch origin auto-sync-update - git merge origin/auto-sync-update --no-ff -m "Auto-sync: Merge with remote changes" || echo "Merge conflicts detected, handling manually." - + + git fetch origin + git pull --rebase origin auto-sync-update + git add -A git commit -m "Auto-sync: Update after running sync.py script" || echo "No changes to commit." - - git push https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git auto-sync-update - + + git push --force https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git auto-sync-update + gh pr create --title "Auto-sync: Update after running sync.py script" --body "This PR was automatically generated by the workflow."