Skip to content

Grant Actions write access to existing GHCR Janus package and verify automated release #4

Closed

Description

@vitormattos

Production image publication blocked after PR #2 merge

The verified merge commit 768756474ac1a42f91ab6d1b80ec734172c25a4b started GitHub Actions run 40247772574.

The reusable Image CI successfully passed all checks, including Bats, linux/amd64, linux/arm64, and Trivy. However the privileged Publish tested commit image job failed while pushing the multiarch OCI index:

denied: permission_denied: write_package

This is not a source build or image vulnerability problem. The pre-existing public GHCR package ghcr.io/librecodecoop/janus contains the legacy 1.3.1 image and is linked to this repository, but the repository's GITHUB_TOKEN does not have write access to that existing package. The workflow already declares packages: write, which is necessary but insufficient without the package-level grant.

One-time administrative change

Using an organization/package administrator account, go to https://github.com/orgs/LibreCodeCoop/packages/container/package/janus/settings and either:

  • Under Manage Actions access, add repository LibreCodeCoop/janus-docker with role Write (least privilege), or
  • If appropriate for the organization's access policy, enable Inherit access from source repository for this already-linked package.

Do not delete/recreate the package, change visibility, add a personal PAT as an Actions secret, or alter the production deployment. GitHub officially documents this under Ensuring workflow access to your package.

Verify once access is granted

  1. Re-run only the failed jobs from run 40247772574, or gh run rerun 40247772574 --failed -R LibreCodeCoop/janus-docker.
  2. Verify the image is present under tag sha-768756474ac1a42f91ab6d1b80ec734172c25a4b.
  3. Confirm that both architectures, provenance/SBOM, and the exact manifest digest pass Trivy scans, then the automatic release job creates Git tag + GitHub Release v1.4.3-r1 and matching OCI tag 1.4.3-r1.
  4. Confirm the OCI tag and SHA tag reference the same digest and that legacy 1.3.1 remains available.

No production deployment is part of this issue.

Activity

  1. self-assigned this
    on Oct 26, 2026
  2. vitormattos commented on Oct 26, 2026

    @vitormattos
    MemberAuthor

    Verified using gh on poland (admin account vitormattos): GHCR janus is public, linked to LibreCodeCoop/janus-docker, and still has only image tag 1.3.1. The repository Actions default permission is write; the build job separately declares packages: write. However, the existing package has no Actions repository write grant. The public GitHub REST API has no package-to-repository grant endpoint: GET, PUT and POST against /orgs/LibreCodeCoop/packages/container/janus/permissions/repositories/975117565 all return HTTP 404. GraphQL introspection lists no package-access mutation. This is an unsupported management operation in gh, not a missing token scope. Next step is the GitHub package settings UI: Manage Actions access -> Add repository -> janus-docker -> Write. Do not replace GITHUB_TOKEN with a personal token, alter image names or delete the legacy 1.3.1. After the single UI grant, gh run rerun 40247772574 --failed -R LibreCodeCoop/janus-docker and verify v1.4.3-r1, OCI digests and GHCR release. No deployment to ADA was attempted.

  3. vitormattos commented on Oct 26, 2026

    @vitormattos
    MemberAuthor

    Resolved: package access now grants the repository workflow write permission. Re-ran GitHub Actions 40247772574 (attempt 3), which completed successfully: Bats, amd64/arm64, Trivy, digest publication and automatic GitHub Release. Git tag v1.4.3-r1 and OCI tags 1.4.3-r1 and sha-768756474ac1a42f91ab6d1b80ec734172c25a4b all published. Both image tags have identical multi-platform OCI manifest digest sha256:7d9c1bd28bdbc7702de924ed8a676f5c1f11afa3abc888654d8d4fc8b78a00d2; legacy 1.3.1 remains available. Production ADA was not changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions