Post

OpenClaw v2026.5.19 升級回顧:arm64 Build 修復與 Tag 策略優化

OpenClaw v2026.5.19 升級回顧:arm64 Build 修復與 Tag 策略優化

這次升級的目標

從 v2026.5.12 升級到 v2026.5.19。這次升級的重點是:

  1. 對齊官方最新版本
  2. 修復 arm64 build 失敗問題
  3. 使用統一的 tag 策略

arm64 Build 失敗問題

問題描述

在 Docker image 建置過程中,arm64 版本(build-arm64 job)持續失敗,錯誤訊息:

1
2
[ERR_PNPM_NO_OFFLINE_TARBALL] A package is missing from the store but cannot download it in offline mode.
The missing package may be downloaded from https://registry.npmjs.org/@grammyjs/types/-/types-3.26.0.tgz.

根本原因

Dockerfile 中使用了 --config.offline=true 參數,導致 pnpm 在 GitHub Actions 環境中無法下載缺少的 package。

arm64 的 Buildx cache 與 amd64 相比,預填充的 package 較少,因此更容易觸發這個問題。

修復方式

Dockerfile:126 移除 --config.offline=true

1
2
3
4
5
6
7
8
# 修改前
CI=true pnpm prune --prod \
  --config.offline=true \
  --config.supportedArchitectures.os=linux \

# 修改後
CI=true pnpm prune --prod \
  --config.supportedArchitectures.os=linux \

Tag 策略優化

問題

原本我們使用 -kuniakil 後綴來區分我們的 tag(如 v2026.5.19-kuniakil),但這造成管理上的混亂。

解決方案

使用與官方一致的 tag(v2026.5.19),但將 tag 指向我們的 commit:

1
2
# 強制推送 tag 到我們的 commit
git push --force origin a15b7d7783:refs/tags/v2026.5.19

這樣當使用 workflow_dispatch 輸入 v2026.5.19 時,會建置我們的程式碼,而非官方版本。


執行的步驟

1. 清理舊的 Docker images

在重新建置前,刪除所有之前錯誤建置的 2026.5.19 images:

1
2
3
# 列出並刪除舊 images
gh api repos/kuniakil/openclaw/actions/run -q '.[].id'
# 刪除 package versions

2. Cherry-pick 自定義 commits

  • chore: upgrade to v2026.4.30 baseline and restore essential configs
  • docs: finalize v2026.5.2 upgrade and record official baseline strategy
  • chore: remove redundant official workflows to stop unnecessary actions
  • docs: update SOP to include mandatory workflow cleanup
  • chore: stop tracking .env
  • chore: cleanup official workflows - keep only docker-release.yml

3. 修復並推送

1
2
3
4
5
6
7
# 修復 Dockerfile
git add Dockerfile
git commit -m "chore: remove offline=true from pnpm prune for arm64 build"
git push origin my-config-v2026.5.19

# 更新 tag
git push --force origin a15b7d7783:refs/tags/v2026.5.19

手動觸發 Docker Build

使用 workflow_dispatch 手動觸發建置:

  • Branch: my-config-v2026.5.19
  • Tag: v2026.5.19

這樣可以確保:

  1. 不會消耗 Actions minutes 在自動建置上
  2. 建置的是我們自定義的版本
  3. Image tag 與官方一致,方便管理

成果

  • arm64 build:成功
  • amd64 build:成功
  • Manifest:成功創建多平台 manifest
  • Image tagghcr.io/kuniakil/openclaw:2026.5.19

Commit 歷史

1
2
3
4
5
a15b7d7783 chore: remove offline=true from pnpm prune for arm64 build
89747c9eaf chore: ignore Upgrade-Retrospective files
93deac6942 chore: restore Upgrade-Retrospective-v2026.5.6.md
...
53921058fb chore: cleanup official workflows - keep only docker-release.yml  ← 基於官方 v2026.5.19

相關文章:

This post is licensed under CC BY 4.0 by the author.