Skip to content

ci: publish the example images to ghcr and make them runnable - #83

Merged
rickstaa merged 11 commits into
mainfrom
rs/ghcr-images
Aug 19, 2026
Merged

ci: publish the example images to ghcr and make them runnable#83
rickstaa merged 11 commits into
mainfrom
rs/ghcr-images

Conversation

@rickstaa

@rickstaa rickstaa commented Aug 18, 2026

Copy link
Copy Markdown
Member

Closes #6.

Two halves: publish to GHCR instead of Docker Hub, and make the published images runnable, which they were not.

1. GHCR instead of Docker Hub

Docker Hub livepeer/ is a curated product namespace (go-livepeer, catalyst, task-runner, lpms-runner) with no examples in it, and it is staying that way, so #6's plan of moving these there is not the fix. GHCR gets the livepeer name without needing anything from the Docker Hub org, publishes with the built-in GITHUB_TOKEN, and has no anonymous pull limit.

It also removes a live bug. The old metadata line read:

images: ${{ vars.DOCKERHUB_NAMESPACE || 'livepeer' }}/runner-example-${{ matrix.example }}

That default is the namespace we are being asked to stay out of, avoided today only because the repo variable happens to be set to rickstaa.

Tags, labels, the amd64-only build, and the push/dispatch allowlist are unchanged. CI_DOCKERHUB_USERNAME and CI_DOCKERHUB_TOKEN are no longer referenced and can be deleted from repo secrets after merge.

2. Running the published image

CI has published these since the workflow landed, but every compose.yml built from source and named no image, so there was nothing a pull could land on. Two lines per example fix it:

image: ghcr.io/livepeer/runner-example-hello-world:latest
pull_policy: build
build: .
Command Result
up -d builds; never contacts a registry
up -d --build builds (the quick start, unchanged)
up -d --pull always runs the published image

--pull always overrides pull_policy from the file, so no second compose file and no env vars are needed, and --build / --pull always are a symmetric pair a reader can find in docker compose up --help.

pull_policy: build also fixes an existing bug on its own: today a plain up -d after editing runner.py silently re-runs the previous image. The rebuild is about a second on a warm cache.

Alternatives ruled out by testing

  • image: alone, no pull_policy. Compose pulls a remote-resolvable image when it is missing locally, even with a build section, so a clean checkout would silently run the published image instead of the contributor's code.
  • APP_IMAGE / APP_PULL_POLICY env vars. The two must move together and nothing enforces it: with the policy forgotten, compose builds from source and tags the result as the published image.
  • docker tag the pulled image to a local name. Works, but the tag is sticky and invisible, so every later up keeps using it, including after source edits.
  • A compose.image.yml overlay. Correct, but four extra files for what one built-in flag already does.

Not yet verified

An actual pull of ghcr.io/livepeer/runner-example-*. Those packages 403 until this merges and CI publishes, so it needs one manual run afterwards, plus a check that each landed public. Visibility is a property of the package rather than the repo, and a private one looks fine to us and fails for everyone else.

Note for #84

#84 adds comfystream/compose.existing.yml for the same purpose. --pull always covers it without the extra file.

🤖 Generated with Claude Code

Docker Hub `livepeer/` is a curated product namespace and these are
examples, so they stay out of it. The workflow defaulted to exactly that
namespace whenever the repo variable was unset, so the wrong target was
one cleared variable away.

GHCR needs no stored credential: the built-in GITHUB_TOKEN publishes,
and public packages pull anonymously, so the Docker Hub secrets go away
rather than move. template-livepeer-runner and
streamdiffusion-livepeer-runner already publish this way.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

rickstaa and others added 2 commits August 18, 2026 17:46
The previous wording said a fork PR's token cannot write packages, which
is true for pull_request but not for pull_request_target, the case the
same sentence names. That invites a reader to delete the `if:` that is
actually doing the work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The removed sentence restated the paragraph above it, and the registry
rationale is maintainer context that already lives in the workflow
header and the PR. What survives is the stale-image warning, which is
the part that helps someone holding an old `rickstaa/` reference.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 18, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The images CI publishes were reachable only by hand: every compose.yml
builds from source and names no image, so there was nothing for a pull
to land on.

Adding `image:` to the base file looked like the fix but is a trap.
Compose's default pull_policy fetches a remote-resolvable image when it
is missing locally, even for a service with a build section, so a plain
`up -d` on a clean checkout would silently run the published image
instead of the contributor's code. `pull_policy: build` avoids that but
makes `docker compose pull` skip the service, losing the point.

An overlay keeps the base file building from source exactly as before
and reaches the registry only when asked, matching how compose.onchain
already layers on. CI now parses the merged pair too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 10:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rickstaa rickstaa changed the title ci: publish the example images to ghcr instead of docker hub ci: publish the example images to ghcr and make them runnable Aug 19, 2026
It does not always build from source: with no `image:` key it builds
once, then reuses that local image until --build. What is load-bearing
is that it never reaches a registry, which is what makes the overlay the
only path to the published image.

Also drops the note about the frozen `rickstaa/` images. Those were
never production, and it was the only thing in the repo pointing readers
at a personal namespace.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 10:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The repo README carried the same "always builds from source" claim the
overlay comments just lost, and the per-example notes named the image
without saying how to run it, which was the original gap.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 10:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The overlay worked but cost four files, and it left the base file's
worst habit intact: with no `image:` key, `up` reuses whatever it built
last, so an edit is silently ignored unless you remember --build.

Two interpolated fields do the same job in the file that was already
there. Unset, the image name is local-only so the registry is never
contacted, and `pull_policy: build` rebuilds every `up`, which the layer
cache keeps near-instant and which means source edits always take. Set
APP_IMAGE and APP_PULL_POLICY=always to run the published image instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 10:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Env vars were the smaller change but the image and the pull policy have
to move together, and nothing enforced that: setting APP_IMAGE alone
built from source and tagged the result as the published image, so you
believed you were running the release while running your own build, and
your local registry cache was poisoned with a fake `latest`.

An overlay cannot be half-applied, so the switch goes back into a file.
The base file keeps the part that was worth having on its own: a
local-only tag it always rebuilds, so it never reaches a registry and an
edit is never silently ignored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

`docker compose up --pull always` overrides `pull_policy` from the file,
so the switch needs no second compose file and no env var pair that can
drift apart. `--build` and `--pull always` are then a symmetric pair a
reader can find in `--help`.

The file keeps `pull_policy: build`, so a bare `up` still builds and
never reaches a registry, and an edit is never silently ignored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 10:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Four lines explaining two was the wrong ratio; what a reader needs is
that `up` builds and that `--pull always` does not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Two lines of rationale for two lines of config; the reasoning is in the
PR and the history, what a reader needs here is the two commands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 19, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rickstaa
rickstaa merged commit 1cca857 into main Aug 19, 2026
6 checks passed
@rickstaa
rickstaa deleted the rs/ghcr-images branch August 19, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: publish example images to the livepeer Docker Hub org

2 participants