Skip to content

ci: publish the Docker image to Docker Hub on release - #1677

Merged
rohitg00 merged 5 commits into
mainfrom
ci/docker-image-release
Nov 4, 2026
Merged

rohitg00 merged 5 commits into
mainfrom
ci/docker-image-release

Conversation

@rohitg00

@rohitg00 rohitg00 commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Publishes a prebuilt agentmemory image to Docker Hub as ghumarerohit/agentmemory whenever a GitHub release is published. npm publishing is unchanged and stays local; publish.yml is not touched.

What the workflow does

.github/workflows/docker-image.yml has three jobs.

build (permissions contents: read, no secrets, no registry login):

  • Resolves the version from the release tag, or from the workflow_dispatch version input for back-fills (at most 128 characters, the Docker tag limit). Checks out the release tag exactly as published, or v<version> for a manual run.
  • Smoke test: builds linux/amd64 with load: true, starts the container, and waits up to 180 s for GET /agentmemory/livez on port 3111. On failure it prints the container logs and stops the run.
  • Builds linux/amd64 and linux/arm64 from deploy/Dockerfile into an OCI archive with OCI labels (source, revision, version, licenses Apache-2.0), and uploads it as an artifact kept for 14 days, so a slow environment approval does not expire it.

publish (environment docker-hub; no checkout, no repository code):

  • Downloads the archive, logs in, and pushes ghumarerohit/agentmemory:<version> with skopeo copy --all --preserve-digests.
  • Verifies that the pushed manifest list contains both linux/amd64 and linux/arm64.
  • Attests build provenance for the pushed digest with actions/attest-build-provenance and pushes the attestation to the registry. This job alone gets id-token: write and attestations: write.

latest (environment docker-hub; concurrency group docker-hub-latest, no cancellation):

  • Points latest at the image of the highest stable release version, picked in semver order from all non-draft, non-prerelease GitHub releases right before the push. If that version's image is not pushed yet, it leaves latest unchanged. An older release, a backport published later, a prerelease, or a manual back-fill can never move latest backwards, and whichever run finishes last converges on the newest stable release.

deploy/README.md gets a short "Prebuilt image" section: pull and run commands, the /data volume, ports 3111 and 3113 bound to loopback, the multi-arch note, and the latest rule.

Security

  • Code from the release tag runs only in build, which has no secrets, no registry login, and a read-only token. The Docker Hub token never reaches a job that has executed repository code.
  • publish and latest do not check out the repository. They only handle the image archive, the registry, and the GitHub releases API.
  • Both jobs that use the secrets run in the docker-hub environment. Add a required reviewer to that environment (Settings > Environments > docker-hub) to approve every push, and you can store DOCKERHUB_USERNAME and DOCKERHUB_TOKEN there as environment secrets instead of repository secrets.
  • BuildKit provenance and SBOM attestations are turned off in the build step, because they would ride inside the archive into a job that never built it. Provenance comes from actions/attest-build-provenance against the pushed digest instead. No SBOM is attached in this version.

Before the first run

  1. The ghumarerohit/agentmemory repository already exists on Docker Hub (public, empty).
  2. Add two secrets, on the repository or on the docker-hub environment:
    • DOCKERHUB_USERNAME: a ghumarerohit org member or bot user that can push to the repository
    • DOCKERHUB_TOKEN: a Docker Hub access token with write scope on ghumarerohit/agentmemory

Back-filling 0.9.32

If 0.9.32 is released before this merges, run Actions > Docker image > Run workflow with version set to 0.9.32. The latest job then points latest at 0.9.32 if it is the highest stable release.

Notes

  • The CHANGELOG is owned by the 0.9.32 release PR (chore: prepare 0.9.32 #1676), so this PR does not touch it.
  • actionlint passes on the workflow.

Summary by CodeRabbit

  • New Features

    • Published releases now provide prebuilt Docker images for AMD64 and ARM64 platforms.
    • The latest image tag tracks the highest stable release version when its image is available; otherwise, it remains unchanged.
  • Documentation

    • Added instructions for pulling and running release images, configuring ports and persistent storage, and setting environment variables.
    • Documented first-run network requirements and recommended pinning a specific version tag.
    • Described the data stored in the persistent volume.

Builds deploy/Dockerfile at the release tag for linux/amd64 and
linux/arm64 and pushes ghumarerohit/agentmemory with the version tag,
plus latest for stable releases. A linux/amd64 build is started first
and must answer /agentmemory/livez before anything is pushed. Images
carry OCI labels, provenance and an SBOM. workflow_dispatch back-fills
a given version.

deploy/README.md documents the prebuilt image.
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agentmemory Ready Ready Preview Nov 4, 2026 11:03am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

Failed to post review comments.

GitHub was unavailable or timed out while CodeRabbit was posting the review. Please request a new review later if the pull request still needs one. This happened while posting 1 inline comment. Use @coderabbitai full review to retry the review.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8416bc96-83a1-4a15-8911-07ed8c7c4176
Commits

Reviewing files that changed from the base of the PR and between fa749a2 and 97465fa.

Files selected for processing: 1
  • .github/workflows/docker-image.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Context from checks skipped due to timeout: 9
  • GitHub Check: windows smoke
  • GitHub Check: packed artifact (ubuntu-latest)
  • GitHub Check: packed artifact (macos-latest)
  • GitHub Check: test (ubuntu-latest, 20)
  • GitHub Check: test (macos-latest, 22)
  • GitHub Check: test (macos-latest, 20)
  • GitHub Check: test (ubuntu-latest, 24)
  • GitHub Check: test (macos-latest, 24)
  • GitHub Check: test (macos-latest, 26)
Additional context used
Path-based instructions: 1
Source excerpt: agentmemory is a persistent memory system for AI coding agents, built on iii-engine's three primitives (Worker/Function/Trigger).

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • .github/workflows/docker-image.yml
Walkthrough

A GitHub Actions workflow builds and smoke-tests release Docker images, publishes amd64 and arm64 images to Docker Hub, and updates the latest tag to the greatest stable release when its image is available. The deployment README adds instructions for running a prebuilt image.

Changes: Docker image publishing

Layer / File(s) Summary
Validate, build, and smoke-test
.github/workflows/docker-image.yml
The workflow accepts published releases or manual version input, validates the version, checks out the matching tag, smoke-tests an amd64 image, and uploads an amd64/arm64 OCI archive.
Publish and attest the versioned image
.github/workflows/docker-image.yml
The workflow pushes the versioned image to Docker Hub, checks that both platforms are present, and attests the pushed digest.
Update latest and document deployment
.github/workflows/docker-image.yml, deploy/README.md
The workflow points latest to the greatest stable release when that image is available. The README documents image startup, loopback-bound ports, persistent /data contents, environment-variable configuration, and first-start network requirements.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseOrManualDispatch
  participant GitHubActions
  participant DockerHub
  ReleaseOrManualDispatch->>GitHubActions: Provide release or version
  GitHubActions->>GitHubActions: Validate version and build image
  GitHubActions->>GitHubActions: Smoke-test amd64 and create amd64/arm64 archive
  GitHubActions->>DockerHub: Publish versioned image and attest digest
  GitHubActions->>DockerHub: Copy greatest stable image to latest when available
Loading

Possibly related PRs

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci: publish the Docker image to Docker Hub on release" matches the main change. The PR adds .github/workflows/docker-image.yml, which publishes the image to Docker Hub when a GitHub release…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "ci: publish the Docker image to Docker Hub on release" matches the main change. The PR adds .github/workflows/docker-image.yml, which publishes the image to Docker Hub when a GitHub release is published. The deploy/README.md update documents the pull commands for that image. The title is specific, short, and does not describe anything absent from the changeset.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

…e job

- build runs the release tag code with no secrets or registry login and
  hands an OCI archive to publish as an artifact.
- publish runs in the docker-hub environment without checking out the
  repository, pushes with skopeo, verifies both platforms and attests
  build provenance for the pushed digest.
- latest is a serialized job that points latest at the release GitHub
  marks as Latest, so an older or delayed release cannot replace it.
The latest job now takes the highest stable release version from all
non-draft, non-prerelease releases instead of the release GitHub marks
as Latest, which a backport published later would become.
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

- Check out the release tag exactly as published; only a manual run
  maps the version to v<version>.
- Reject versions longer than the 128-character Docker tag limit.
- Keep the image artifact for 14 days so a slow environment approval
  does not expire it.
- Treat no stable release as a clean no-op under pipefail.

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 new potential issue.

Devin Review

Comment thread .github/workflows/docker-image.yml Resolved
@rohitg00
rohitg00 merged commit ea206eb into main Nov 4, 2026
15 checks passed
@rohitg00
rohitg00 deleted the ci/docker-image-release branch November 4, 2026 18:19
rohitg00 added a commit that referenced this pull request Nov 4, 2026
Adds the CHANGELOG lines for #1599 and #1677, which merged after the
0.9.32 section was written. Updates the gist badge to 1.7k stars and
240 forks in the README and every translation, drops the Copilot setup
note that still waits for the 0.9.30 release, and regenerates the
website metadata for 0.9.32.

This branch was successfully deployed

1 active deployment
Preview — 97465fad Deployed Nov 4, 2026 by vercel[bot]
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