mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
The workflow_dispatch `ref` input is meant to preview an unmerged branch,
and the only ref guaranteed to carry this workflow after merge is master —
so the expected way to run it is dispatch-from-master with `ref` set to the
branch. But on a workflow_dispatch dispatched from master, `github.ref` is
the default branch, so `type=raw,value=latest,enable={{is_default_branch}}`
still fired: a preview image would move `latest` and poison every host that
pulls it. `type=semver` was likewise ungated (a dispatch from a v* tag would
have minted a release tag pointing at the previewed ref).
Gate both off for workflow_dispatch so a manual run can only ever produce
the `sha-<short>` tag. The `latest` gate now checks the default branch
explicitly instead of `{{is_default_branch}}` so it can also exclude the
dispatch case; on push:master and tag:v* the emitted tags are unchanged.
Tested: js-yaml and ruby YAML both parse the file; grep confirms both the
self-hosted and cloud meta blocks are gated symmetrically.
Co-Authored-By: Paperclip <noreply@paperclip.ing>