Skip to content

refactor(tests): remove unnecessary braces in test file #3

refactor(tests): remove unnecessary braces in test file

refactor(tests): remove unnecessary braces in test file #3

name: Sync Godot Addon to Sample
on:
push:
branches: [main]
paths: [Godot/**]
permissions:
contents: write
concurrency:
group: polypet-sync-godot-main
cancel-in-progress: false
jobs:
sync:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
ref: main
- name: Sync and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
for attempt in 1 2 3; do
git fetch origin main
git checkout main
git reset --hard origin/main
bash ./scripts/sync-godot-sample.sh
git add -f Samples/PolyPetDemoGodot/addons/PolyPet/
if git diff --cached --quiet; then
exit 0
fi
git commit -m "chore: sync Godot addon to sample project"
if git push origin HEAD:main; then
exit 0
fi
done
echo "::error::Failed to push synced Godot sample changes after 3 attempts."
exit 1