Commit f424007505
Unsigned ci/sync-man-pages: success
Layout: unified · split
.gitbay/ci.yml added +21
| @@ -0,0 +1,21 @@ | ||
| 1 | # Weekly man-page catalog sync, ported from the GitHub workflow. The change | |
| 2 | # lands as an MR for review, never straight on main. The script refuses to | |
| 3 | # write a suspiciously short list, so an upstream markup change can't | |
| 4 | # silently gut the catalog. | |
| 5 | jobs: | |
| 6 | sync-man-pages: | |
| 7 | schedule: "0 6 * * 1" | |
| 8 | steps: | |
| 9 | - python3 scripts/sync_man_pages.py | |
| 10 | - | | |
| 11 | set -e | |
| 12 | if git diff --quiet -- Hutch/Resources/man-pages.json; then | |
| 13 | echo "catalog unchanged" | |
| 14 | exit 0 | |
| 15 | fi | |
| 16 | git -c user.name=ci -c user.email=ci@gitbay.org checkout -q -B automated/man-page-catalog | |
| 17 | git -c user.name=ci -c user.email=ci@gitbay.org commit -qam "Sync bundled man page catalog with man.sr.ht" | |
| 18 | git push -qf origin automated/man-page-catalog | |
| 19 | if ! ssh git@127.0.0.1 mr list krz/hutch --json | grep -q "automated/man-page-catalog"; then | |
| 20 | ssh git@127.0.0.1 "mr create krz/hutch --source automated/man-page-catalog --target main --title 'Sync bundled man page catalog' --body 'Automated update from scripts/sync_man_pages.py. Review the diff to Hutch/Resources/man-pages.json before merging.'" | |
| 21 | fi | |
.github/workflows/sync-man-pages.yml deleted −55
| @@ -1,55 +0,0 @@ | ||
| 1 | name: Sync man pages | |
| 2 | ||
| 3 | # Keeps Hutch/Resources/man-pages.json — the official man-page list the More tab | |
| 4 | # renders — in step with man.sr.ht, so the catalog is never hand-maintained. | |
| 5 | # | |
| 6 | # scripts/sync_man_pages.py re-derives the list from the man.sr.ht landing page. | |
| 7 | # If the result differs from the committed copy, this opens (or updates) a pull | |
| 8 | # request with the change. The script refuses to write a suspiciously short list, | |
| 9 | # so an upstream markup change can't silently gut the catalog. | |
| 10 | # | |
| 11 | # Note: PRs opened with the default GITHUB_TOKEN do not themselves trigger other | |
| 12 | # workflows (GitHub blocks that to avoid recursion), so the Tests workflow won't | |
| 13 | # run on the auto-PR. That's fine here — the change is a bundled JSON resource — | |
| 14 | # and a maintainer can push an empty commit to run CI if they ever want it. | |
| 15 | on: | |
| 16 | schedule: | |
| 17 | # Weekly, Mondays 06:00 UTC. Upstream churns rarely; this is frequent enough. | |
| 18 | - cron: "0 6 * * 1" | |
| 19 | workflow_dispatch: | |
| 20 | ||
| 21 | permissions: | |
| 22 | contents: write | |
| 23 | pull-requests: write | |
| 24 | ||
| 25 | concurrency: | |
| 26 | group: sync-man-pages | |
| 27 | cancel-in-progress: true | |
| 28 | ||
| 29 | jobs: | |
| 30 | sync: | |
| 31 | runs-on: ubuntu-latest | |
| 32 | steps: | |
| 33 | - uses: actions/checkout@v7 | |
| 34 | ||
| 35 | - uses: actions/setup-python@v5 | |
| 36 | with: | |
| 37 | python-version: "3.12" | |
| 38 | ||
| 39 | - name: Regenerate man page catalog | |
| 40 | run: python3 scripts/sync_man_pages.py | |
| 41 | ||
| 42 | - name: Open pull request on change | |
| 43 | uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7 | |
| 44 | with: | |
| 45 | add-paths: Hutch/Resources/man-pages.json | |
| 46 | branch: automated/man-page-catalog | |
| 47 | delete-branch: true | |
| 48 | commit-message: "Sync bundled man page catalog with man.sr.ht" | |
| 49 | title: "Sync bundled man page catalog" | |
| 50 | body: | | |
| 51 | Automated update: the official man-page list on man.sr.ht changed. | |
| 52 | ||
| 53 | Regenerated by `scripts/sync_man_pages.py`. Review the diff to | |
| 54 | `Hutch/Resources/man-pages.json` before merging. | |
| 55 | labels: documentation | |