From 7426c5d835be9d5d8461658540e58bf0ce2b72ee Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 20 Mar 2026 17:03:33 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E5=98=97=E8=A9=A6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=85=A9=E7=A8=AE=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yaml | 8 +++++++- entrypoint.sh | 7 +------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/action.yaml b/action.yaml index b553afb..4d02b9d 100644 --- a/action.yaml +++ b/action.yaml @@ -8,10 +8,16 @@ author: 'Jeffery' outputs: version: description: '計算出的新版本號' + value: ${{ steps.calculate.outputs.version }} runs: using: 'docker' image: 'Dockerfile' env: GITEA_SERVER_URL: ${{ gitea.server_url }} GITEA_REPOSITORY: ${{ gitea.repository }} - RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }} \ No newline at end of file + RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }} + using: 'composite' + steps: + - name: 將檔案寫到輸出 + id: calculate + run: echo "VERSION.txt" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 0b467e5..a5bf07e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -70,10 +70,5 @@ PATCH=$((PATCH + 1)) # 組合新的版本號,並顯示 NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION" -# 確保 GITHUB_OUTPUT 檔案的目錄存在 -mkdir -p "$(dirname "$GITHUB_OUTPUT")" - # 將版本輸出到環境變數 -echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT - -exit 0 \ No newline at end of file +echo "version=$NEW_VERSION" >> "VERSION.txt" \ No newline at end of file