Repository navigation
Sync from upstream #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync from upstream | |
| on: | |
| schedule: | |
| - cron: '*/15 * * * *' # Every 15 minutes | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Sync fork with upstream | |
| run: | | |
| RESULT=$(gh api repos/${{ github.repository }}/merge-upstream -f branch=main 2>&1) | |
| echo "$RESULT" | |
| # Only log when there's actual changes (not "already up to date") | |
| if echo "$RESULT" | grep -q "fast-forward\|merge"; then | |
| echo "Synced successfully" | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |