ci: auto-rebuild image when PyPtt has new release#19
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scheduletrigger,定期檢查 PyPI 上的 PyPtt 最新版本ghcr.io/pyptt/ptt_mcp_server:pyptt-<version>已存在於 GHCR,直接 skip build,避免重複編譯相同 PyPtt 版本的 imagepyptt-<version>tag,讓每個 PyPtt 版本對應到唯一、不變的 image tag(解決「同 tag 不同內容」的問題)no-cache: true,確保真的抓到最新的 PyPttpush到 main 與workflow_dispatch維持原本行為(一律 build)Test plan
workflow_dispatch觸發,確認仍會 build 並推:testtagpyptt-<version>已存在時會 skippyptt-<新版本>tagGenerated by Claude Code