No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Claude 38ce16ccef
All checks were successful
Build and push NightCoop hub image / build (push) Successful in 11s
ci: build and push the NightCoop hub image when the mirror's main moves
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:15:31 -04:00
.forgejo/workflows ci: build and push the NightCoop hub image when the mirror's main moves 2026-10-24 13:15:31 -04:00
README.md ci: build and push the NightCoop hub image when the mirror's main moves 2026-10-24 13:15:31 -04:00

NightCoop hub builder

Builds the container image for the NightCoop hub (the matchmaking and relay server of the NightCoop Cyberpunk 2077 co-op mod), which upstream does not publish. The source comes from the Forgejo mirror gmatte/nightcoop-hub, and the build uses upstream's own tools/hub/docker/Dockerfile unchanged.

Images go to forgejo.gmatte.xyz/gmatte/nightcoop-hub as:

  • :<first 12 chars of the upstream commit>, which a deployment pins to
  • :latest

When it builds

  • When the mirror's main moves. Nothing polls: a webhook on the mirror dispatches the workflow (below). The mirror syncs every 8h; Synchronize now on the mirror triggers a build right away if upstream has moved.
  • On push to this repository's main.
  • Manually with Run workflow, for any upstream branch, tag or commit.

Configure Forgejo before running

  1. Add a REGISTRY_TOKEN Actions secret to this repository: a token of the gmatte user with write:package scope. The workflow logs in as the repository owner.

  2. On the mirror, gmatte/nightcoop-hub → Settings → Webhooks → Add webhook → Forgejo:

    • Target URL: https://forgejo.gmatte.xyz/api/v1/repos/gmatte/nightcoop-builder/actions/workflows/build.yml/dispatches
    • HTTP method POST, content type application/json
    • Trigger on: Push events only, branch filter main
    • Authorization header: token <TOKEN>, a token with write:repository that can write to this repository

    A mirror sync that brings new commits fires a push event. Its payload carries "ref": "refs/heads/main" at the top level, which the dispatch API reads as the ref to run this workflow on. The other fields are ignored and the upstream_ref input falls back to main.