Repository navigation
Sync ok-nte tasks #7
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 ok-nte tasks | |
| on: | |
| schedule: | |
| - cron: "30 3 * * 6" # 每周六 03:30 UTC(北京 11:30,与 okef/okww 错开避免并发改同一 yml) | |
| workflow_dispatch: # 支持手动触发 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install deps | |
| run: pip install ruamel.yaml | |
| - name: Check and apply new numbers | |
| id: sync | |
| run: | | |
| set -e | |
| # exit=0 无差异;exit=1 有差异(自动 apply 后开 PR); | |
| # exit=2 抓取/解析失败(跳过本次,不误开 PR) | |
| # 首跑输出保留到 CI 日志(抓取/解析失败时可查原因),不丢 /dev/null。 | |
| code=0 | |
| python tools/sync_oknte_tasks.py || code=$? | |
| if [ $code -eq 1 ]; then | |
| python tools/sync_oknte_tasks.py --apply | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| elif [ $code -eq 0 ]; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| # 抓取/解析失败:输出已在上方打印,本次不 apply、不开 PR。 | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create Pull Request | |
| if: steps.sync.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| commit-message: "chore: sync ok-nte task lists from upstream" | |
| title: "chore: 同步异环副本(数字 + 追猎目标)" | |
| body: | | |
| 检测到异环副本有更新,已从 ok-nte 上游同步到 `config/daily_task_list.yml`: | |
| - 异象界域(数字):`AnomalyTask.py` 的 `_ID_RANGE` | |
| - 追猎目标(boss 名):`AnomalyHunter.py` 的 `HUNTER_TARGETS` | |
| - 新增数字的 display 为占位数字,**请人工改成友好名**(如 光暗/鸟/苹果) | |
| - 新增的追猎目标为 boss 中文名,**请人工核对**是否与游戏内一致 | |
| - 移除的项仅报告不删除(避免上游短暂回退时丢配置) | |
| branch: auto-sync/oknte-tasks | |
| delete-branch: true |