Skip to content

fix(ci): add explicit permissions to docker jobs to fix ghcr push failure - #333

Merged
Nitya-003 merged 1 commit into
Nitya-003:mainfrom
Harshita264:fix/ghcr-push-permissions
Jul 19, 2026
Merged

fix(ci): add explicit permissions to docker jobs to fix ghcr push failure#333
Nitya-003 merged 1 commit into
Nitya-003:mainfrom
Harshita264:fix/ghcr-push-permissions

Conversation

@Harshita264

Copy link
Copy Markdown
Contributor

Closes #256

What This PR Does

Adds explicit permissions blocks to the build-and-test-docker and security-scan jobs in .github/workflows/ci.yml to fix the GHCR push failure.

Root Cause

The workflow had a top-level permissions block with packages: write, but GitHub Actions does not reliably propagate top-level permissions to individual jobs when using fine-grained tokens or GitHub App installations. The build-and-test-docker job was attempting to push to ghcr.io/nitya-003/innerhue:main without an explicit packages: write grant at the job level, causing:

Changes Made

Added explicit permissions block to two jobs in ci.yml:

build-and-test-docker

permissions:
  contents: read
  packages: write

security-scan

permissions:
  contents: read
  packages: write

The top-level permissions block, docker/login-action registry config, and GITHUB_TOKEN usage were already correct — no other changes were needed.

Testing

This fix can be verified by merging to main and observing the build-and-test-docker job successfully push toghcr.io/nitya-003/innerhue:main without the denied error.

Why This Matters

The Docker publish pipeline has been broken since the workflow was introduced. Without this fix, no Docker images are ever pushed to GHCR, making the entire CI/CD publish pipeline non-functional.

@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

@Harshita264 is attempting to deploy a commit to the Nitya Gosain's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Nitya-003
Nitya-003 merged commit 729b0b6 into Nitya-003:main Jul 19, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix GHCR push failure (denied: installation not allowed to Create organization package)

2 participants