forge-detect-probe/.github/workflows/probe.yml
probe 2dc517534e
All checks were successful
probe / preflight (push) Successful in 6s
probe: exercise forge_detect/forge_preflight on a real Forgejo runner
2026-08-02 18:30:26 +00:00

24 lines
913 B
YAML

name: probe
on: [push]
jobs:
preflight:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: forge_detect must say forgejo, from the runner's own env
run: |
. lib/forge.sh
got="$(forge_detect)" || { echo "DETECT FAILED"; exit 1; }
echo "forge_detect -> $got"
[ "$got" = forgejo ] || { echo "WRONG: wanted forgejo"; exit 1; }
- name: forge_preflight must REFUSE the gh client here
run: |
. lib/forge.sh
if CEREMONY_FORGE_CLIENT=gh forge_preflight; then
echo "REGRESSION: preflight passed a gh client on a Forgejo forge"; exit 1
fi
echo "refused as required (exit non-zero above)"
- name: forge_preflight must PASS the rest client here
run: |
. lib/forge.sh
CEREMONY_FORGE_CLIENT=rest forge_preflight && echo "rest client accepted"