퀴즈 중단 시 stopContext 호출 및 결과 모달 비정상 Off 상황 제거 (#350) #19
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 Fork | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| repository_dispatch: | |
| types: [upstream-update] | |
| workflow_dispatch: | |
| env: | |
| FORK_REPO: "git-good-w/git-animal-client" | |
| UPSTREAM_REPO: "git-goods/git-animal-client" | |
| jobs: | |
| trigger-sync: | |
| if: vars.IS_FORK_REPO == '' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger fork repository sync | |
| run: | | |
| echo "🚀 Triggering sync for fork: ${{ env.FORK_REPO }}" | |
| echo "📌 Branch pushed: ${{ github.ref_name }}" | |
| curl -X POST \ | |
| -H "Accept: application/vnd.github.v3+json" \ | |
| -H "Authorization: token ${{ secrets.FORK_SYNC_TOKEN }}" \ | |
| https://api.github.com/repos/${{ env.FORK_REPO }}/dispatches \ | |
| -d '{"event_type":"upstream-update","client_payload":{"branch":"${{ github.ref_name }}","commit":"${{ github.sha }}"}}' | |
| echo "✅ Fork sync triggered" | |
| sync-upstream: | |
| if: vars.IS_FORK_REPO != '' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.SYNC_TOKEN }} # ← GITHUB_TOKEN 대신 SYNC_TOKEN | |
| - name: Setup Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Sync with upstream | |
| run: | | |
| echo "🔄 Syncing from upstream: ${{ env.UPSTREAM_REPO }}" | |
| git remote add upstream https://github.com/${{ env.UPSTREAM_REPO }}.git | |
| git fetch upstream | |
| # main 브랜치 동기화 | |
| echo "📦 Syncing main branch..." | |
| git checkout -B main origin/main | |
| git merge upstream/main --no-edit | |
| git push origin main | |
| echo "✅ main branch synced" | |
| # dev 브랜치 동기화 | |
| echo "📦 Syncing dev branch..." | |
| git checkout -B dev origin/dev 2>/dev/null || git checkout -b dev upstream/dev | |
| git merge upstream/dev --no-edit | |
| git push origin dev | |
| echo "✅ dev branch synced" | |
| - name: Summary | |
| run: | | |
| echo "✨ Sync completed successfully!" | |
| echo "Upstream: ${{ env.UPSTREAM_REPO }}" |