Skip to content

feat(push-kustomize): render from a caller-chosen ref - #173

Merged
patrick-hermann-sva merged 1 commit into
mainfrom
feat/push-kustomize-ref
Sep 8, 2026
Merged

feat(push-kustomize): render from a caller-chosen ref#173
patrick-hermann-sva merged 1 commit into
mainfrom
feat/push-kustomize-ref

Conversation

@patrick-hermann-sva

Copy link
Copy Markdown
Contributor

On a pull_request, actions/checkout takes the merge commit GitHub builds, not the head. A caller whose tag is composed from head_sha therefore publishes an artefact rendered from a different commit than the one its name points at — and nothing about that is visible without comparing by hand.

schmetterpause has shipped exactly that twice (its #177 and #179) and its inline job carries the fix in a comment that says so:

          # The head of the pull request, not the merge commit GitHub builds by
          # default. The tag this publishes under is `pr-<n>-<head sha>`,
          # because that is the string the preview ApplicationSet composes from
          # its own `.head_sha` — so building anything else would put a name on
          # an artefact that is not what the name says. Twice already
          # (#177, #179) this repository shipped a tag that did not identify
          # its artefact; both times it was invisible until digests were
          # compared by hand.
          ref: ${{ github.event.pull_request.head.sha }}

That is the last reason its ~120-line inline job cannot simply call this workflow. With #169 (kcl-parameters), #170 (additional-tags) and this one, it can — and the follow-up in schmetterpause deletes it.

It matters here for a second reason the comment also names: the source rendered is kcl/, and the profile under it may be exactly what the pull request changes. Rendering the merge commit would then publish an artefact of something the author did not write.

Backward compatible

Empty by default, so push and workflow_dispatch keep checkout's own default and no existing caller changes behaviour.

🤖 Generated with Claude Code

https://claude.ai/code/session_0146MzPecusrKBGXKenKsKY1

On a pull request actions/checkout takes the merge commit GitHub builds, not
the head. A caller whose tag is composed from head_sha therefore publishes an
artefact rendered from a different commit than the one its name points at, and
nothing about that is visible without comparing by hand.

schmetterpause has shipped exactly that twice (its #177 and #179) and carries
`ref: github.event.pull_request.head.sha` in its own inline job because of it.
It is the last reason that job cannot become a call to this workflow.

Empty by default, so push and workflow_dispatch keep checkout's own default
and no existing caller changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146MzPecusrKBGXKenKsKY1
@patrick-hermann-sva
patrick-hermann-sva merged commit 3e83fec into main Sep 8, 2026
1 check passed
@patrick-hermann-sva
patrick-hermann-sva deleted the feat/push-kustomize-ref branch September 8, 2026 09:47
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