Skip to content

feat(release): publish watchdog image to GHCR and Docker Hub#17

Open
stephenctw wants to merge 2 commits into
mainfrom
feature/release-publish-watchdog-ghcr
Open

feat(release): publish watchdog image to GHCR and Docker Hub#17
stephenctw wants to merge 2 commits into
mainfrom
feature/release-publish-watchdog-ghcr

Conversation

@stephenctw

Copy link
Copy Markdown
Collaborator

Push ghcr.io/cartesi/sequencer-watchdog: (multi-arch manifest) alongside existing docker-save tarballs. Mirrors cartesi/cli container publishing so operators can COPY --from= in custom rootfs builds (e.g. Fly.io).

Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN repo secrets for Docker Hub mirror.

Push ghcr.io/cartesi/sequencer-watchdog:<tag> (multi-arch manifest) alongside
existing docker-save tarballs. Mirrors cartesi/cli container publishing so
operators can COPY --from= in custom rootfs builds (e.g. Fly.io).

Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN repo secrets for Docker Hub mirror.
@stephenctw stephenctw self-assigned this Jun 23, 2026

@endersonmaia endersonmaia 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.

I strongly suggest using the docker/build-push-action instead of handling stuff via docker commands.

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Address PR review: push ghcr.io and docker.io tags without arch suffixes
(buildx assembles the multi-arch manifest), replace shell docker build/push
with docker/build-push-action, and drop the separate imagetools manifest job.
@stephenctw stephenctw force-pushed the feature/release-publish-watchdog-ghcr branch from 19faf39 to 9abc31a Compare June 23, 2026 13:41
@stephenctw

Copy link
Copy Markdown
Collaborator Author

I strongly suggest using the docker/build-push-action instead of handling stuff via docker commands.

Can you take a look if the new change makes sense?

Comment on lines +233 to +255
- name: Export docker-save tarball for GitHub Release
uses: docker/build-push-action@v6
with:
context: .
file: watchdog/Dockerfile
platforms: ${{ matrix.platform }}
push: false
tags: sequencer-watchdog:export
outputs: type=docker,dest=${{ runner.temp }}/watchdog-image.tar
build-args: |
RELEASE_TAG=${{ inputs.tag || github.ref_name }}
GIT_COMMIT=${{ github.sha }}
CARTESI_MACHINE_VERSION=${{ env.CARTESI_MACHINE_VERSION }}
CARTESI_MACHINE_DEB_SHA256=${{ steps.cartesi_deb.outputs.sha }}
cache-from: type=gha

- name: Compress docker-save artifact
env:
TAG: ${{ inputs.tag || github.ref_name }}
run: |
set -euo pipefail
DEB_SHA="${!DEB_SHA_ENV}"
image="sequencer-watchdog:${TAG}"
docker build \
--platform "${{ matrix.platform }}" \
--build-arg "RELEASE_TAG=${TAG}" \
--build-arg "GIT_COMMIT=${GITHUB_SHA}" \
--build-arg "CARTESI_MACHINE_VERSION=${CARTESI_MACHINE_VERSION}" \
--build-arg "CARTESI_MACHINE_DEB_SHA256=${DEB_SHA}" \
-f watchdog/Dockerfile \
-t "${image}" \
.
mkdir -p dist
docker save "${image}" | gzip -9 > "dist/sequencer-watchdog-${TAG}-linux-${{ matrix.arch }}.tar.gz"
gzip -9 -c "${{ runner.temp }}/watchdog-image.tar" > "dist/sequencer-watchdog-${TAG}-linux-${{ matrix.arch }}.tar.gz"

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.

Unless you insist in releasing an OCI tarball, I'd remove all of this.

If we're gonna release via container registry, this tarball release makes no sense to me.

One could always pull from registry and generate the tarball themselves.

@@ -188,25 +193,66 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

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.

I mss a setup-qemu action so the multiarch can work.

Suggested change
- name: Set up QEMU
uses: docker/setup-qemu-action@v4

| Docker Hub | `docker.io/cartesi/sequencer-watchdog:vX` |

Multi-arch manifest (`amd64` + `arm64`). Per-arch tags also exist as
`vX-amd64` / `vX-arm64` if you need to pin architecture explicitly.

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.

I don't think we have those vX-$arch tags.

Suggested change
`vX-amd64` / `vX-arm64` if you need to pin architecture explicitly.
Multi-arch manifest (`amd64` + `arm64`).

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.

2 participants