Skip to content

ci: auto-rebuild image when PyPtt has new release#19

Merged
PttCodingMan merged 1 commit into
mainfrom
claude/determined-edison-B1wyE
May 25, 2026
Merged

ci: auto-rebuild image when PyPtt has new release#19
PttCodingMan merged 1 commit into
mainfrom
claude/determined-edison-B1wyE

Conversation

@PttCodingMan
Copy link
Copy Markdown
Member

Summary

  • 加入每天 UTC 16:00(台北 00:00)的 schedule trigger,定期檢查 PyPI 上的 PyPtt 最新版本
  • 排程觸發時,若 ghcr.io/pyptt/ptt_mcp_server:pyptt-<version> 已存在於 GHCR,直接 skip build,避免重複編譯相同 PyPtt 版本的 image
  • 新增 pyptt-<version> tag,讓每個 PyPtt 版本對應到唯一、不變的 image tag(解決「同 tag 不同內容」的問題)
  • Build 加上 no-cache: true,確保真的抓到最新的 PyPtt
  • push 到 main 與 workflow_dispatch 維持原本行為(一律 build)

Test plan

  • 手動 workflow_dispatch 觸發,確認仍會 build 並推 :test tag
  • 等 schedule 第一次跑(或調短 cron 測試),確認當 pyptt-<version> 已存在時會 skip
  • PyPtt 有新版時,下一次 schedule 觸發應該會 build 並推上對應的 pyptt-<新版本> tag

Generated by Claude Code

Add daily scheduled trigger that checks PyPI for the latest PyPtt
version and skips the build if an image tagged pyptt-<version>
already exists in GHCR. This avoids re-building duplicate images
when PyPtt has not been updated.

Also tag built images with pyptt-<version> so each PyPtt version
maps to a unique, immutable tag, and enable no-cache to ensure
the latest PyPtt is actually pulled during build.
@PttCodingMan PttCodingMan merged commit e21338c into main May 25, 2026
1 check passed
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.

2 participants