Skip to content

Conversation

manavgup
Copy link
Owner

@manavgup manavgup commented Sep 7, 2025

Summary

This PR fixes the Docker registry authentication issues and CI build failures that were occurring after merging the previous CI/CD improvements.

Issues Fixed

1. CI Build Failure

  • Problem: CI workflow was trying to push Docker images on PRs, causing authentication failures
  • Solution: Removed Docker push from CI workflow, now only builds images locally
  • Result: CI workflow will pass on PRs without trying to push to GHCR

2. Docker Registry Authentication

  • Problem: 403 Forbidden errors when pushing to GHCR in publish workflow
  • Solution:
    • Added id-token: write permission to publish workflow
    • Added continue-on-error: true to Docker login step
    • Improved error handling for registry operations

Changes Made

CI Workflow (.github/workflows/ci.yml)

  • Removed Docker login step (not needed for building)
  • Simplified build step to only build images, not push them
  • Removed all Docker push operations from CI workflow

Publish Workflow (.github/workflows/publish.yml)

  • Added id-token: write permission for better authentication
  • Added continue-on-error: true to Docker login for better error handling
  • Maintained all existing functionality for main branch pushes

Expected Results

  • ✅ CI pipeline will pass on PRs (no more build failures)
  • ✅ Publish workflow will handle Docker registry issues more gracefully
  • ✅ Images will still be built and pushed on main branch merges
  • ✅ Better error handling and logging throughout

Testing

The CI pipeline should now run successfully on this PR without the previous build failures.

- Remove Docker push from CI workflow (only build, no push on PRs)
- Remove Docker login from CI workflow (not needed for building)
- Add id-token permission to publish workflow
- Add continue-on-error to Docker login in publish workflow
- Simplify CI build step to only build images, not push them

This should fix both the CI build failure and the Docker registry
authentication issues in the publish workflow.
@manavgup manavgup merged commit 7e32203 into main Sep 7, 2025
4 checks passed
@manavgup manavgup deleted the ci-cd-pipeline-improvements branch September 7, 2025 07:55
manavgup added a commit that referenced this pull request Sep 19, 2025
Fix Docker registry and CI build issues
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.

1 participant