Files
release-cleanup/entrypoint.sh
T
JefferyandClaude Opus 4.8 b1aa8730a2 refactor(release-cleanup): 將清理邏輯由 bash 改寫為 Node.js 模組
依功能分組為 logger/validate/config/gitea-client/releases/tags 模組,
entrypoint.sh 改為呼叫 node /app/index.js,Dockerfile 改用 node:20-alpine 基底。
對外行為(清理舊 release 與未指定 release 的 tag)維持不變。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 10:35:19 +08:00

15 lines
753 B
Bash

#!/usr/bin/env sh
# =============================================================================
# 用途: release-cleanup Action 的容器進入點 (entrypoint)。
# 專案已由 bash 改寫為 Node.js,本腳本僅負責啟動 /app/index.js,
# 由 Node.js 程式執行實際的 release 清理邏輯。
# 更新日期: 2026/06/26 10:28:36
# =============================================================================
# set -e: 任一指令失敗即中止; set -u: 使用未定義變數即報錯。確保失敗能即時暴露。
set -eu
# 進入點:實際邏輯改由 Node.js 實作,集中於 /app 目錄。
# 以 exec 取代當前 shell process,讓 node 成為容器的 PID 1,正確接收訊號 (SIGTERM 等)。
exec node /app/index.js