reuse-surface/.forgejo/workflows/recompose-fallback.yaml
tegwick 09d5b0f131
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s
ci / validate-registry (push) Successful in 2m13s
Build and Publish Container Image / build-and-push (push) Successful in 2m13s
REUSE-WP-0019-T03: add Forgejo Actions workflows (part 2 of prior commit)
The .forgejo/workflows/ files and doc updates described in 4862ed6 didn't
actually get staged there (git add silently skipped them after an earlier
pathspec miss on the already-deleted .gitea file) -- committing them now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 21:25:01 +02:00

29 lines
1 KiB
YAML

# Scheduled fallback recompose trigger (REUSE-WP-0019-T03 design principle 3:
# "degrade to schedule" if the org-level webhook is unavailable or misses an
# event). The webhook (POST /v1/webhooks/forgejo) is the primary path; this
# just guarantees the hub's composed index doesn't go stale indefinitely if a
# webhook delivery is ever missed.
name: Recompose Fallback
on:
schedule:
- cron: "17 */6 * * *"
workflow_dispatch:
jobs:
recompose:
runs-on: ubuntu-latest
steps:
- name: Trigger hub recompose
env:
REUSE_SURFACE_TOKEN: ${{ secrets.REUSE_SURFACE_TOKEN }}
run: |
set -eu
apt-get update -qq
apt-get install -y -qq curl >/dev/null
status=$(curl -sS -o /tmp/compose.json -w '%{http_code}' \
-X POST "https://reuse.coulomb.social/v1/federated/compose" \
-H "Authorization: Bearer ${REUSE_SURFACE_TOKEN}")
echo "status=${status}"
cat /tmp/compose.json
[ "${status}" = "200" ]