ci: run sync-man-pages on the container runner !11

merged merged by cmc on 2026-09-11 01:05 UTC · krz/hutch:ci-podman-runner into main

1 file changed, +17 −3

Layout: unified · split

.gitbay/ci.yml +17 −3
@@ -2,6 +2,14 @@
2# lands as an MR for review, never straight on main. The script refuses to 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 3# write a suspiciously short list, so an upstream markup change can't
4# silently gut the catalog. 4# silently gut the catalog.
5#
6# The build runs in a container on the instance's runner, which holds no
7# key of its own inside the container. The push and the merge request go
8# over SSH as the hutch-ci account (write on this repository): its private
9# key arrives as the BOT_SSH_KEY build secret and is written into the
10# workspace beside an ssh config every ssh and git call is pointed at
11# with -F. GITBAY_SSH, set by the runner, is the instance as this build
12# reaches it.
5jobs: 13jobs:
6 # Reads every view file for icon-only controls without accessibility 14 # Reads every view file for icon-only controls without accessibility
7 # labels — no build, no simulator. The xcodebuild test plan is not 15 # labels — no build, no simulator. The xcodebuild test plan is not
@@ -19,9 +27,15 @@ jobs:
19 echo "catalog unchanged" 27 echo "catalog unchanged"
20 exit 0 28 exit 0
21 fi 29 fi
30 test -n "$BOT_SSH_KEY" || { echo "ERROR: BOT_SSH_KEY secret is not set"; exit 1; }
31 test -n "$GITBAY_SSH" || { echo "ERROR: GITBAY_SSH is not set; the runner is too old"; exit 1; }
32 umask 077
33 printf '%s\n' "$BOT_SSH_KEY" > "$PWD/.bot_key"
34 printf 'IdentityFile %s\nIdentitiesOnly yes\nStrictHostKeyChecking accept-new\nUserKnownHostsFile %s\n' "$PWD/.bot_key" "$PWD/.known_hosts" > "$PWD/.ssh_config"
35 export GIT_SSH_COMMAND="ssh -F $PWD/.ssh_config"
22 git -c user.name=ci -c user.email=ci@gitbay.org checkout -q -B automated/man-page-catalog 36 git -c user.name=ci -c user.email=ci@gitbay.org checkout -q -B automated/man-page-catalog
23 git -c user.name=ci -c user.email=ci@gitbay.org commit -qam "Sync bundled man page catalog with man.sr.ht" 37 git -c user.name=ci -c user.email=ci@gitbay.org commit -qam "Sync bundled man page catalog with man.sr.ht"
24 git push -qf origin automated/man-page-catalog 38 git push -qf "ssh://$GITBAY_SSH/krz/hutch.git" automated/man-page-catalog
25 if ! ssh git@127.0.0.1 mr list krz/hutch --json | grep -q "automated/man-page-catalog"; then 39 if ! ssh -F "$PWD/.ssh_config" "$GITBAY_SSH" mr list krz/hutch --json | grep -q "automated/man-page-catalog"; then
26 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.'" 40 ssh -F "$PWD/.ssh_config" "$GITBAY_SSH" "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.'"
27 fi 41 fi