Repository navigation
Add CloudNative-PG image and path-filter image builds - #2
Merged
Merged
Conversation
- Add Dockerfile.cnpg (CNPG base + postgresql-18-pgtap), published to the same GHCR package with a -cnpg tag suffix. - Extract build/push/sign steps into reusable build-image.yml, with a per-image Dockerfile, tag suffix and GHA cache scope. - docker-publish.yml now builds only when Dockerfile changes; docker-publish-cnpg.yml builds only when Dockerfile.cnpg changes. - Replace nightly cron with workflow_dispatch. - Document both images and CNPG usage in README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Release builds can overwrite the standard image’s latest tag, and the documented CNPG deployment fails version validation.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds a CloudNative-PG variant alongside the existing PostgreSQL/pgTAP image, sharing the publishing pipeline.
Changes:
- Adds the CNPG image and deployment example.
- Shares build, push, and signing steps with separate cache scopes.
- Replaces nightly builds with Dockerfile-filtered, release-tag, and manual builds.
| File | Description |
|---|---|
| README.md | Documents image variants and CNPG deployment. |
| Dockerfile.cnpg | Adds pgTAP to the CNPG base image. |
| .github/workflows/docker-publish.yml | Delegates standard builds with path filtering. |
| .github/workflows/docker-publish-cnpg.yml | Adds CNPG builds with suffixed tags. |
| .github/workflows/build-image.yml | Centralizes building, publishing, caching, and signing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Set onlatest=true so the latest tag that metadata-action adds on v*.*.* tag pushes gets the -cnpg suffix, instead of the CNPG build overwriting the standard image's latest. - CNPG can't derive the major version from a latest-cnpg tag; use an ImageCatalog with major: 18 in the README example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Dockerfile.cnpg: CloudNative-PG18.6-standard-trixiebase withpostgresql-18-pgtap. It is published to the sameghcr.io/robertomachorro/postgres-pgtappackage with a-cnpgsuffix on every tag (latest-cnpg,<sha>-cnpg,vX.Y.Z-cnpg, …)..github/workflows/build-image.yml. Each image passes its own Dockerfile, tag suffix and build-cache scope, so the two images don't overwrite each other's cache.docker-publish.ymlnow runs only whenDockerfilechanges. The newdocker-publish-cnpg.ymlruns only whenDockerfile.cnpgchanges.workflow_dispatchso either image can be rebuilt by hand.Cluster.Notes
v*.*.*tag still builds both images, because GitHub doesn't apply path filters to tag pushes.Test plan
Dockerfile.cnpg, so "Docker (CNPG)" should run (build only, no push) and the standard "Docker" workflow should notlatest-cnpgand<sha>-cnpgappear on the GHCR package andlatestis unchanged🤖 Generated with Claude Code