mirror of
https://github.com/Ar9av/obsidian-wiki.git
synced 2026-09-14 20:36:34 +08:00
e8172201fc
The readme-sync workflow no longer fails when README.md and README_TW.md don't change together. Instead, check_readme_sync.py reports drift: it lists commits that touched README.md after the last README_TW.md update, plus the pending English diff to translate and backfill. CI surfaces drift as a warning annotation only. Claude-Session: https://claude.ai/code/session_01PG9Pz6tcUfgpTHLjq3BT5Q
33 lines
861 B
YAML
33 lines
861 B
YAML
name: README sync
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
readme-translation-drift:
|
|
name: readme-translation-drift (advisory)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.9"
|
|
|
|
- name: Test README sync checker
|
|
run: python -m unittest discover -s tests -p 'test_readme_sync.py' -v
|
|
|
|
- name: Report README translation drift (never blocks merge)
|
|
run: |
|
|
python tools/check_readme_sync.py || echo "::warning file=README_TW.md::README_TW.md is behind README.md. Run 'python tools/check_readme_sync.py' locally, then translate and backfill the pending changes."
|