Skip to content

ci(container): skip image push on fork pull requests#1050

Open
futpib wants to merge 1 commit into
xrelkd:developfrom
futpib:fix/ci-container-push-fork-pr
Open

ci(container): skip image push on fork pull requests#1050
futpib wants to merge 1 commit into
xrelkd:developfrom
futpib:fix/ci-container-push-fork-pr

Conversation

@futpib
Copy link
Copy Markdown
Contributor

@futpib futpib commented May 10, 2026

Fork pull requests get a read-only GITHUB_TOKEN for the upstream organization's GHCR namespace, so the unconditional push: true on the bake step always fails with denied: installation not allowed to Write organization package, turning the Container check red on every PR opened from a fork.

Make the push conditional: still publish on push events and on PRs from branches in the same repository (preserving the existing pr-N tag behavior for upstream PRs), but only build (no push) when the PR head lives in a different repository.

Fork pull requests get a read-only `GITHUB_TOKEN` for the upstream
organization's GHCR namespace, so the unconditional `push: true` on the
bake step always fails with `denied: installation not allowed to Write
organization package`, turning the Container check red on every PR
opened from a fork.

Make the push conditional: still publish on push events and on PRs from
branches in the same repository (preserving the existing `pr-N` tag
behavior for upstream PRs), but only build (no push) when the PR head
lives in a different repository.
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