Skip to content

add docker release workflow for publishing docker image to ghcr - #8

Merged
fmazmz merged 1 commit into
mainfrom
workflow/release-pipeline-#6
Feb 6, 2026
Merged

add docker release workflow for publishing docker image to ghcr#8
fmazmz merged 1 commit into
mainfrom
workflow/release-pipeline-#6

Conversation

@fmazmz

@fmazmz fmazmz commented Feb 5, 2026

Copy link
Copy Markdown
Member

Closes #6

Summary by CodeRabbit

  • Chores
    • Added automated Docker image publishing workflow that triggers on release creation, enabling consistent multi-architecture image builds and distribution to the container registry.

@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A new GitHub Actions workflow is introduced that automatically publishes Docker images to GHCR when a release is created. The workflow builds and pushes multi-architecture images (AMD64 and ARM64) using Docker Buildx with dynamically generated tags and labels.

Changes

Cohort / File(s) Summary
GitHub Actions Docker Release Workflow
.github/workflows/docker-release.yml
Introduces automated Docker image publishing on release events. Configures multi-platform builds (linux/amd64, linux/arm64) with GHCR authentication, dynamic metadata extraction, and buildx integration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A workflow born, a release declared,
Docker images pushed with utmost care,
Multi-arch builds across the land,
AMD and ARM, hand in hand! 📦✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing a GitHub Actions workflow for publishing Docker images to GHCR on release events.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch workflow/release-pipeline-#6

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/docker-release.yml:
- Line 37: The org.opencontainers.image.source label currently uses ${{
github.repository }} which yields "owner/repo" not a full URL; change it to
construct the full GitHub repository URL by using ${{ github.server_url }}/${{
github.repository }} (or ${{ github.repositoryUrl }} if available) so the label
org.opencontainers.image.source contains the complete https://... URL; update
the workflow line referencing org.opencontainers.image.source to use that full
URL expression.
🧹 Nitpick comments (2)
.github/workflows/docker-release.yml (2)

3-5: Consider using published instead of created for the release trigger.

The created type fires when a release is first created, including draft releases. Using published is more common for release workflows as it triggers when the release is actually published (made public), avoiding accidental image pushes from drafts.

Suggested change
 on:
   release:
     types:
-      - created
+      - published

36-36: Consider using semver tag type for release-triggered workflows.

The type=ref,name=short strategy generates tags based on git refs. For release workflows, using type=semver patterns will extract proper semantic version tags from your release tag (e.g., v1.2.31.2.3, 1.2, 1, latest).

Suggested change for semantic versioning tags
       - name: Extract Docker metadata
         id: meta
         uses: docker/metadata-action@v5
         with:
           images: ghcr.io/${{ github.repository_owner }}/project-webserver-juv25d
-          tags: type=ref,name=short
+          tags: |
+            type=semver,pattern={{version}}
+            type=semver,pattern={{major}}.{{minor}}
           labels: org.opencontainers.image.source=${{ github.repository }}

Comment thread .github/workflows/docker-release.yml
@fmazmz
fmazmz merged commit 2bb8152 into main Feb 6, 2026
2 checks passed
@fmazmz
fmazmz deleted the workflow/release-pipeline-#6 branch February 6, 2026 07:45
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.

workflow: Create a release pipeline that will build Docker Image and push it to GHCR

3 participants