[PR #4] [CLOSED] Add flexible Docker registry strategy support with separate workflows #26
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
webgrip/workflows#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/webgrip/workflows/pull/4
Author: @Copilot
Created: 8/31/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-3📝 Commits (4)
04c6029Initial plan5ae9546Add GitHub Container Registry support to Docker workflows8e6dfd8Fix YAML formatting and complete GHCR implementationefe8739Implement separate registry workflows with conditional strategy selection📊 Changes
9 files changed (+705 additions, -12 deletions)
View changed files
➕
.github/composite-actions/docker-build-push-dockerhub/action.yml(+55 -0)➕
.github/composite-actions/docker-build-push-dual/action.yml(+101 -0)➕
.github/composite-actions/docker-build-push-ghcr/action.yml(+94 -0)➕
.github/composite-actions/docker-build-push-smart/action.yml(+93 -0)📝
.github/workflows/docker-build-and-push.yml(+91 -5)➕
.github/workflows/docker-registry-strategy-examples.yml(+112 -0)📝
.github/workflows/helm-chart-deploy.yml(+3 -3)📝
.github/workflows/helm-charts-deploy.yml(+8 -4)➕
DOCKER_REGISTRY_GUIDE.md(+148 -0)📄 Description
This PR implements a flexible multi-registry approach for Docker image publishing, allowing users to choose between GitHub Container Registry (GHCR), Docker Hub, both, or neither based on available secrets and project needs.
New Architecture
Instead of modifying the existing docker-build-push action, this creates separate composite actions for different registry scenarios:
docker-build-push-ghcr- GitHub Container Registry only (no Docker secrets needed)docker-build-push-dockerhub- Docker Hub only (requires Docker credentials)docker-build-push-dual- Both registries (requires Docker credentials)docker-build-push-smart- Auto-detection based on available secretsSmart Strategy Selection
The main
docker-build-and-push.ymlworkflow now supports aregistry-strategyinput:Available Strategies:
auto(default) - Automatically chooses based on available secretsghcr- GHCR only, uses GitHub token automaticallydockerhub- Docker Hub only, requires Docker credentialsdual- Both registries, requires Docker credentialslegacy- Original behavior for backward compatibilitynone- Build only, no pushTag Generation Examples
The system intelligently handles tag conversion:
Migration Benefits
Helm Workflow Updates
Updated
helm-chart-deploy.ymlto useghcr.io/webgrip/helm-deploy:latestwith GitHub token authentication, removing dependency on Docker Hub credentials for container access.Documentation
Comprehensive documentation and examples provided:
DOCKER_REGISTRY_GUIDE.md- Complete usage guide and migration instructionsdocker-registry-strategy-examples.yml- Working examples of all strategiesFixes #3 with a more flexible, user-controlled approach.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.