From 7d563c725d937ca706265209666fab4d15cd8302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B3=BB=E7=B5=B1=E7=AE=A1=E7=90=86=E5=93=A1?= <1+admin@noreply.localhost> Date: Mon, 15 Jun 2026 03:19:45 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20entrypoint.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entrypoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index cd75246..a92d76e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,6 +30,14 @@ require_env() { } write_output() { + # 1. 先抽取 $GITHUB_OUTPUT 檔案的父目錄路徑 + local output_dir + output_dir="$(dirname "$GITHUB_OUTPUT")" + + # 2. 強制建立該目錄(若不存在),避免 1.0.8 沙盒隔離導致路徑遺失 + mkdir -p "$output_dir" + + # 3. 安全地寫入變數 printf 'version=%s\n' "$1" >> "$GITHUB_OUTPUT" }