No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gabriel Moisan Matte d615469b06
All checks were successful
Build and push PinePods image / build (push) Successful in 17m47s
ci: skip the build when the commit's image is already in the registry
Checks pinepods:<commit12> anonymously before building, so an empty mirror
sync, a push here, or a re-dispatch of the same ref does not rebuild a
version that exists. A manual run can tick "force" to rebuild anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:38:14 -05:00
.forgejo/workflows ci: skip the build when the commit's image is already in the registry 2026-11-01 14:38:14 -05:00
README.md ci: skip the build when the commit's image is already in the registry 2026-11-01 14:38:14 -05:00

PinePods builder

Builds the PinePods container image from upstream main, as soon as it moves. Upstream only publishes the main image on releases and in a once-a-day nightly; this gets a main commit into the registry within one build. No PinePods code lives here, and nothing is patched: the source comes from the Forgejo mirror gmatte/PinePods, and the build uses upstream's own root dockerfile unchanged.

Images go to forgejo.gmatte.xyz/gmatte/pinepods as:

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

The search backend (Backend/) is not built here: upstream already pushes docker.io/madeofpendletonwool/pinepods_backend:latest on every main push that touches it.

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.

Each upstream commit is built once: if :<commit> is already in the registry, the run stops after resolving the commit. Tick force on a manual run to rebuild anyway (e.g. to pick up a newer base image).

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/PinePods → Settings → Webhooks → Add webhook → Forgejo:

    • Target URL: https://forgejo.gmatte.xyz/api/v1/repos/gmatte/pinepods-bulder/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.