strawberry/.forgejo/workflows/runner-probe.yml
trvon f58a765033
All checks were successful
release / draft (push) Has been skipped
release / build (debian:trixie, trixie) (push) Successful in 31m13s
release / build (ubuntu:24.04, noble) (push) Successful in 26m59s
release / publish (push) Has been skipped
CI: Forgejo release workflow, test lane and runner probe
release.yml builds, tests and packs a Linux install tree per distro
(debian:trixie, ubuntu:24.04), one at a time with JOBS=2 and nice.
Branches (main, ci/**) and PRs run the test lane and print each sha256;
a v* tag uploads the tarballs and .sha256 files to a draft release and
publishes it only when every build passed.

runner-probe.yml checks that a runner with the docker label picks up
jobs, can clone this repo with the job token and reach the API.

packaging/ci/build-release.sh is the shared build step. It refuses to
run outside CI because it installs packages.

Forgejo now reads .forgejo/workflows and ignores .github/workflows,
whose ubuntu-24.04/macos-15 labels no runner here provides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:26:02 -07:00

44 lines
1.8 KiB
YAML

# Checks that a Forgejo Actions runner picks up jobs for this repo and can do what
# release.yml needs: run a distro container, clone this private repo with the job
# token, and reach the API. Builds nothing. Run it from the Actions tab
# (workflow_dispatch) or push any commit to the ci/probe branch.
#
# If the job stays "waiting", no runner has the `docker` label: change `runs-on`
# to a label shown under Settings -> Actions -> Runners (here and in release.yml).
name: runner-probe
on:
workflow_dispatch:
push:
branches: [ci/probe]
jobs:
probe:
runs-on: docker
container:
image: debian:trixie
steps:
- name: Environment
run: |
. /etc/os-release; echo "os=$ID $VERSION_CODENAME"
echo "arch=$(dpkg --print-architecture) nproc=$(nproc)"
grep -E 'MemTotal|MemAvailable' /proc/meminfo
echo "server=$GITHUB_SERVER_URL repo=$GITHUB_REPOSITORY ref=$GITHUB_REF sha=$GITHUB_SHA"
- name: Tools
run: |
apt-get update -q && apt-get install -y -q --no-install-recommends git ca-certificates curl python3 >/dev/null
git --version; curl --version | head -1
- name: Clone with the job token
env:
TOKEN: ${{ github.token }}
run: |
git init -q src && cd src
git -c http.extraHeader="Authorization: token $TOKEN" fetch -q --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" "$GITHUB_SHA"
git checkout -q FETCH_HEAD && git log -1 --format='checked out %h %s'
- name: API reachable
env:
TOKEN: ${{ github.token }}
run: |
code=$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: token $TOKEN" \
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/releases?limit=1")
echo "releases API http=$code"; test "$code" = 200