Skip to content

build(release): publish the urbex-op image on ghcr.io and use it by default - #107

Merged
Teg79 merged 6 commits into
mainfrom
build/urbex-op-image
Nov 17, 2026
Merged

Teg79 merged 6 commits into
mainfrom
build/urbex-op-image

Conversation

@Teg79

@Teg79 Teg79 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • tools/operator/Containerfile: three stages.
    • tools: Debian with the tools from mise.toml, as before.
    • release (--target release): tools plus the binary GoReleaser built for the platform, read from <os>/<arch>/urbex in the context (TARGETPLATFORM).
    • The last stage, the default: tools plus urbex built from the checkout, as before. It now takes URBEX_COMMIT, so a source build's urbex version says its commit (the context has no .git).
  • .github/workflows/release.yml (on top of build(release): binaries with GoReleaser on a version tag #106), after GoReleaser:
    • the image's context from dist/artifacts.json (the linux binaries) and mise.toml;
    • QEMU and Buildx, login to ghcr.io with GITHUB_TOKEN (packages: write for the release job);
    • build and push ghcr.io/urbforge/urbex-op:<version>, and :latest unless the tag has a suffix, linux/amd64 and linux/arm64, with OCI labels (source, version, licence) and provenance;
    • attach urbex-op to the release with URBEX_OP_VERSION set to the version (the step fails if the line didn't change);
    • then publish the release, as in build(release): binaries with GoReleaser on a version tag #106.
  • tools/operator/urbex-op:
    • URBEX_OP_VERSION=dev in the repository. A release's copy runs ghcr.io/urbforge/urbex-op:<its version>; from a checkout, urbex-operator, the image build makes, as before. URBEX_OPERATOR_IMAGE still overrides either.
    • Pulls a published image the first time (urbex-op: pulling ...); with a local image missing, says to run urbex-op build.
    • urbex-op version: the script's version and its image.
    • build without a checkout says it needs one.
    • build passes the commit.
  • tools/operator/README.md, README.md: the release path (download one file, it pulls its image), the default image, how a release builds the image.

The ghcr package is created private by the first push: making it public is a package setting (Teg, after the first -rc).

Depends on #106 (GoReleaser), itself on #105: this branch is on top of both.

Why

Testers should pull a published image instead of building it from a checkout (v0.1.0, urbforge/redemptor#53).

Tests I ran

  • The workflow's context step on the artifacts of a local, never-pushed v0.1.0-rc.0 GoReleaser run: linux/amd64/urbex, linux/arm64/urbex, mise.toml.
  • podman build --platform linux/amd64 --target release on that context: builds without the Go stage. In the image, urbex version says 0.1.0-rc.0, with Terraform 1.13.3, ansible-core 2.21.5 and sops 3.13.3.
  • The release copy of urbex-op (version set to 0.1.0-rc.0):
    • against that image (URBEX_OPERATOR_IMAGE): init, then urbex version, both work;
    • with the default image: it tries to pull ghcr.io/urbforge/urbex-op:0.1.0-rc.0 (403 for now: nothing is published yet);
    • version;
    • build refuses without a checkout.
  • The checkout's urbex-op: a missing local image gives the hint; urbex-op build still builds, and its urbex version now says dev (commit a85a781, linux/amd64).
  • mise run lint: passes.
  • Not run: the workflow itself (it needs a pushed tag), the arm64 image (built under QEMU on the runner), docker on macOS. After merge: Teg pushes v0.1.0-rc.1, then I check the image on both architectures with podman (Linux) and docker (macOS, with Teg).

Checklist before review

Fixes #103

🤖 Generated with Claude Code

https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA

Teg79 and others added 3 commits November 16, 2026 19:38
urbex version (and --output json), urbex --version, and the version at the top of urbex doctor. A release sets it with -ldflags -X; a build from source says dev and the commit Go embedded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
…efault

The release workflow builds tools/operator/Containerfile's release target from GoReleaser's binaries, for linux/amd64 and linux/arm64, pushes ghcr.io/urbforge/urbex-op:<version> (and :latest without a suffix), and attaches urbex-op set to that version. urbex-op runs its version's image and pulls it the first time; from a checkout, the image build makes, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
@Teg79
Teg79 merged commit 8fccb7f into main Nov 17, 2026
1 check passed
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.

build(release): publish the urbex-op image on ghcr.io and use it by default

2 participants