STAC-25543 Publish per-commit images for pull requests so beest can verify pre-merge - #255
Merged
Merged
Conversation
GitLab published a per-commit image on every branch and merge request, which is what made the manual beest verification button useful before merge. The GitHub lane gated publish-image and merge-multiarch-manifest on master, so no image existed for a commit until after it had already merged. Allow same-repository pull requests to publish as well. Fork PRs stay excluded by an explicit head-repo check, and GitHub does not expose QUAY_PASSWORD to them regardless. No push trigger is added for other branches: that would run every pipeline twice on a public repo. The tag is already correct pre-merge, since every job checks out github.event.pull_request.head.sha and derives the 8-char short SHA that beest resolves a branch to. push-single-arch refuses to overwrite an existing tag, but the repository merges via merge commits, so a master SHA never collides with the PR head SHA it came from. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Andreagit97
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the one remaining GitLab→GitHub CI parity gap on this repo.
Problem
GitLab published a per-commit image on every branch and MR —
publish_k8s_dockerhad no branch rules. That is what made the manual beest verification button useful: you could verify a commit before merging it.The GitHub lane gates
publish-imageandmerge-multiarch-manifestonrefs/heads/master, so no image exists for a commit until after it has already merged. STAC-25521 closed by documenting the beest replacement but explicitly left this as the open decision.Change
Allow same-repository pull requests to publish, in addition to the existing master lane.
Why this is safe
github.event.pull_request.head.repo.full_name == github.repository, and GitHub does not exposeQUAY_PASSWORDto fork PRs regardless.github.event.pull_request.head.sha || github.shaand derives the 8-char short SHA from it — exactly what beest resolves a branch to, so the existingworkflow_dispatchinputs on beestagent-x86.yml/arm.yml/openshift.ymlline up with no change on their side.push-single-archrefuses to overwrite an existing tag, but this repo merges via merge commits (and rebase rewrites SHAs), so a master commit SHA is never equal to the PR head SHA it came from.pushtrigger for all branches — on a public repo that would run every pipeline twice.ci-successalready treatsskippedas passing and any other non-success as failing, so a publish failure now correctly turns the PR red.Not restored
The
$CI_COMMIT_REF_SLUGbranch-slug multi-arch tag frommerge_k8s_docker_manifeststays dropped — an org-wide code search found no consumers, and beest consumes the short SHA.Validation
actionlint— no new findings (only the pre-existingSC2153at line 178).zizmorv1.28.0 —No findings to report.publish-imageandmerge-multiarch-manifestshould now run and publishquay.io/stackstate/stackstate-k8s-process-agent:ef6d0834.https://stackstate.atlassian.net/browse/STAC-25543