Skip to content

ci: publish ax-server, ax-task-runner and opt-in agent images on release tags - #611

Closed
MushuEE wants to merge 2 commits into
mainfrom
ci/release-images
Closed

MushuEE wants to merge 2 commits into
mainfrom
ci/release-images

Conversation

@MushuEE

@MushuEE MushuEE commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Part of #609 (stage 1 images, stage 2 agent images). Validation is tracked in #610.

What

Adds .github/workflows/release-images.yml. When a vX.Y.Z[-PRERELEASE] tag is pushed, it builds the AX images from that tag and pushes them to ghcr.io/google/ax/<image>:<tag>:

Image Platforms Built
ax-server linux/amd64, linux/arm64 always
ax-task-runner linux/amd64, linux/arm64 always
claude-code (Dockerfile.claude-code) linux/amd64 only when listed in AX_RELEASE_AGENT_IMAGES
  • Agent images are opt-in. Publishing one redistributes the agent CLI, so nothing is built unless the repository variable AX_RELEASE_AGENT_IMAGES names it. The variable is unset by default, so Claude Code stays off. Each agent image is built on the ax-task-runner of the same tag. Adding Antigravity later means adding a runner, a Dockerfile, a .dockerignore entry, and one AGENT_CATALOG entry (docs/release-images.md).
  • Reruns are idempotent. An image that already exists for the tag is not rebuilt, so digests never change. A manual run with overwrite rebuilds it. :latest is never moved.
  • Dry runs. PRs that touch the workflow, a Dockerfile.*, or .dockerignore, and manual runs with dry_run, build everything into a registry that exists only inside the job and publish nothing. Only google/ax publishes. Forks can only do dry runs.
  • Tag triggers only. Scheduled (nightly) builds of main are deferred until the tag flow has been validated (Validate the build and release workflow runs #610).

Auth is the job's GITHUB_TOKEN with packages: write, so no GCP setup is needed. Action pins, BuildKit, and the registry image are the same ones the repo already uses.

Testing

  • The YAML parses. I checked the agent-selection jq logic locally: empty → [], whitespace is trimmed, and an unknown name fails with the list of known names. I checked the tag regex against valid and invalid tags.
  • This PR touches the workflow, so its own dry run is the first end-to-end check of the base images. To exercise the agent path without publishing, after merge: gh workflow run release-images.yml -f tag=<existing tag> -f agent_images=claude-code -f dry_run=true.

After merge

  • The first publish should be a prerelease tag (vX.Y.Z-rc.1). GHCR creates new org packages as private, so an org owner needs to make ax-server and ax-task-runner public and link them to google/ax.
  • Record runs in Validate the build and release workflow runs #610.

…ase tags

Pushing a vX.Y.Z[-PRERELEASE] tag builds the images from that tag and
pushes them to ghcr.io/google/ax/<image>:<tag>: ax-server and
ax-task-runner for linux/amd64 and linux/arm64.

Agent task images (Dockerfile.claude-code today, Antigravity later) are
built on the same tag's ax-task-runner, but only when listed in the
AX_RELEASE_AGENT_IMAGES repository variable, since publishing them
redistributes the agent CLI. Adding an agent is one AGENT_CATALOG entry.

Images that already exist for the tag are not rebuilt unless a manual run
sets overwrite. Pull requests touching the Dockerfiles or the workflow do a
dry run into a job-local registry. Scheduled builds of main are deferred
until the tag flow is validated.

Part of #609.
- Treat only a registry 'not found' as a missing image; any other error
  (auth, rate limit, network) fails the run instead of rebuilding and
  replacing a published digest.
- Key the concurrency group by tag so a tag push and a manual run for the
  same tag cannot race.
- Refuse tags whose Dockerfiles predate multi-arch builds, and check that
  every platform's image holds that platform's binary.
- Document the minimum tag, agent dry runs, and first-publish linking.
@MushuEE

MushuEE commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #616 (stage 1 of #609). It builds and publishes ax-server and ax-task-runner on release tags along with the CLI, digest-pinned manifests, and the GitHub release, so this workflow would build the same images twice per tag. The existence-check hardening and tag-keyed concurrency from here are carried over. Agent images are out of scope for #609: they are built and released in https://github.com/agentexecutor/images.

@MushuEE MushuEE closed this Nov 16, 2026
Lukeluds added a commit to Lukeluds/ax-images that referenced this pull request Nov 18, 2026
Add .github/workflows/release.yaml modeled on google/ax#611:

- Triggered on vMAJOR.MINOR.PATCH[-PRERELEASE] tags, workflow_dispatch,
  and pull requests touching the workflow or Dockerfiles (dry run).
- Builds linux/amd64 and linux/arm64 images via pinned BuildKit and
  pushes them to ghcr.io/agentexecutor/<image>:<tag> (or an ephemeral
  local registry during dry runs).
- Skips images that already exist for the tag unless overwrite=true,
  failing on transient registry errors so published digests are never
  replaced accidentally. Never moves :latest.
- Prints pinned @sha256:... digests in the job summary.
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.

1 participant