Skip to content

Publish multi-arch pg_durable Docker images to GHCR on releases and main#218

Merged
pinodeca merged 3 commits into
mainfrom
copilot/publish-docker-image
Jun 10, 2026
Merged

Publish multi-arch pg_durable Docker images to GHCR on releases and main#218
pinodeca merged 3 commits into
mainfrom
copilot/publish-docker-image

Conversation

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

pg_durable currently requires local source builds to try the extension, creating a high setup barrier for evaluation. This PR adds automated publishing of a ready-to-run public image so users can start from docker run instead of compiling Rust/pgrx locally.

  • Container publishing workflow

    • Adds .github/workflows/docker-publish.yml to build and push a multi-arch image (linux/amd64, linux/arm64) to ghcr.io/<owner>/pg_durable.
    • Triggers on:
      • push to main
      • version tags (v*)
      • workflow_dispatch
    • Uses Buildx/QEMU and GitHub Actions cache-backed builds.
  • Tagging strategy

    • Always publishes traceable tags: pg17, sha-<short_sha>.
    • On main: publishes edge.
    • On release tags (vX.Y.Z): publishes latest, vX.Y.Z, and X.Y.Z.
  • README updates

    • Documents the public GHCR image and tag behavior in the Packages section.
    • Adds a direct docker run example for pulling and starting the prebuilt image.
# .github/workflows/docker-publish.yml (tag selection)
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
  tags+=("${IMAGE_NAME}:edge")
fi

if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
  version="${GITHUB_REF#refs/tags/v}"
  tags+=(
    "${IMAGE_NAME}:${version}"
    "${IMAGE_NAME}:v${version}"
    "${IMAGE_NAME}:latest"
  )
fi

Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ready-to-use Docker image to public registry Publish multi-arch pg_durable Docker images to GHCR on releases and main Jun 9, 2026
Copilot AI requested a review from pinodeca June 9, 2026 14:50
@pinodeca pinodeca marked this pull request as ready for review June 9, 2026 16:41
- Remove push-to-main/edge trigger; publish only on v* tags and dispatch
- Build published image with http-allow-all (test/learning only); add
  HTTP_FEATURE build arg to Dockerfile and document not-for-production
- Add shared composite action to build + smoke-test the image; use it in
  both Docker CI and the publish workflow so the image is verified pre-push
- Bake PG major into tags (X.Y.Z-pg17, vX.Y.Z-pg17, sha-<sha>-pg17); only
  the highest stable release moves floating pg17/latest tags
- Treat v*-prerelease tags as immutable-only (no floating tag moves)
- Add OCI image labels (source, version, revision, licenses, etc.)
- Support workflow_dispatch ref input to publish a tag predating the workflow
- Add dry_run input to rehearse the publish path without pushing to GHCR
- Trigger Docker CI on changes to the shared composite action
@pinodeca pinodeca merged commit 970ce42 into main Jun 10, 2026
6 checks passed
@pinodeca pinodeca deleted the copilot/publish-docker-image branch June 10, 2026 12:55
@pinodeca

Copy link
Copy Markdown
Contributor

I bypassed review rules and merged this one because:

  • the refactor of the Docker CI workflow was validated by green run
  • I am unable to test the new Docker Publish workflow until it's merged to main.

I will test and open a follow-up PR.

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.

Publish a ready-to-use Docker image to a public container registry

2 participants