Upstream Sync #238
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: Upstream Sync | |
| permissions: | |
| contents: write | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| sync_latest_from_upstream: | |
| name: Sync latest commits from upstream repo | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.repository.fork }} | |
| steps: | |
| - name: Checkout target repo | |
| uses: actions/checkout@v6 | |
| - name: Sync upstream changes | |
| id: sync | |
| uses: aormsby/[email protected] | |
| with: | |
| upstream_sync_repo: Loyalsoldier/geoip | |
| upstream_sync_branch: master | |
| target_sync_branch: master | |
| target_repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| test_mode: false | |
| - name: Sync check | |
| if: failure() | |
| run: | | |
| echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。" | |
| exit 1 |