Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

fix(ci): the Docker release build publishes its version tag, not latest (#671)

Yaowei Zheng21bc623a976a
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 3d526d6f..8a948b42 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -208,15 +208,19 @@ jobs:
# `stable` line: a deployment that wants a release pins its version, and `latest` is main.
# The commit comes from the checkout rather than from github.sha, which on a dispatch names
# the branch the run was started on and not the tag.
+ #
+ # The two are told apart by the `tag` input, not by the event name: a workflow_call from
+ # release.yml runs under the caller's event, which for a tag push is `push` as well, so an
+ # event test sent the v0.2.10 and v0.2.11 release builds to `latest` and published no
+ # version tag. The input is required on both call paths and absent on a push to main.
- name: Resolve the version and its tag
id: version
env:
- EVENT: ${{ github.event_name }}
TAG: ${{ inputs.tag }}
run: |
COMMIT="$(git rev-parse HEAD)"
echo "commit=$COMMIT" >> "$GITHUB_OUTPUT"
- if [ "$EVENT" = "push" ]; then
+ if [ -z "$TAG" ]; then
echo "version=main-$(printf '%s' "$COMMIT" | cut -c1-7)" >> "$GITHUB_OUTPUT"
echo "tag=latest" >> "$GITHUB_OUTPUT"
else
diff --git a/changelog/unreleased/2026-09-10-docker-release-tag.md b/changelog/unreleased/2026-09-10-docker-release-tag.md
new file mode 100644
index 00000000..5864d45f
--- /dev/null
+++ b/changelog/unreleased/2026-09-10-docker-release-tag.md
@@ -0,0 +1,15 @@
+# The release publishes the Docker image under its version again
+
+- **Date:** 2026-09-10
+- **Type:** fix
+- **Scope:** `ci`
+- **PR:** [#671](https://github.com/Prism-Shadow/penguin-harness/pull/671)
+
+[中文版](2026-09-10-docker-release-tag.zh.md)
+
+`docker.yml` tells a release build from a push to `main` by whether the `tag` input is set, not
+by the event name. A `workflow_call` from the release workflow runs under the caller's event,
+which for a tag push is `push` too, so the release builds of v0.2.10 and v0.2.11 moved `latest`
+and published no `X.Y.Z` tag. Both versions were published afterwards by dispatching the
+workflow with the tag, which took the right path all along; from here a release lands on its
+exact version on the first run.
diff --git a/changelog/unreleased/2026-09-10-docker-release-tag.zh.md b/changelog/unreleased/2026-09-10-docker-release-tag.zh.md
new file mode 100644
index 00000000..a65ee614
--- /dev/null
+++ b/changelog/unreleased/2026-09-10-docker-release-tag.zh.md
@@ -0,0 +1,13 @@
+# 发布流程重新把 Docker 镜像发布到版本号标签下
+
+- **Date:** 2026-09-10
+- **Type:** fix
+- **Scope:** `ci`
+- **PR:** [#671](https://github.com/Prism-Shadow/penguin-harness/pull/671)
+
+[English](2026-09-10-docker-release-tag.md)
+
+`docker.yml` 现在以 `tag` 输入是否存在来区分发布构建和 `main` 的推送构建,而不再看事件名。发布工作流
+以 `workflow_call` 调用它时沿用调用方的事件,tag 推送的事件名同样是 `push`,于是 v0.2.10 与 v0.2.11 的
+发布构建都推到了 `latest`,没有发布 `X.Y.Z` 标签。这两个版本随后通过带 tag 手动触发该工作流补发(这条
+路径一直是对的);自此发布会在第一次运行时就落到精确的版本号标签上。