From 8cf6a41f3cd01d1337e3583113ee70f3b170e8f7 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 20 Mar 2026 17:31:29 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E7=9B=B8=E4=BF=A1=20AI=20=E5=86=8D?= =?UTF-8?q?=E8=A9=A6=E4=B8=80=E6=AC=A1=20GITHUB=5FOUTPUT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/master.yaml | 15 ++------------- action.yaml | 3 +++ entrypoint.sh | 4 ++-- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml index c7b0a44..b31cbcb 100644 --- a/.gitea/workflows/master.yaml +++ b/.gitea/workflows/master.yaml @@ -10,7 +10,7 @@ jobs: - name: 發布專案 uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }} with: - tag_name: "v0.1.9" + tag_name: "v0.2.0" - name: 清理舊版本 (保留最新2個) uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} with: @@ -25,19 +25,8 @@ jobs: version: ${{ steps.version.outputs.version }} steps: - name: 計算版本號 - uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.1.9 - - name: 顯示工作目錄 - run: | - echo "工作目錄: $(pwd)" && ls -la - workspace: ${{ github.workspace }} - - name: 顯示工作目錄 - run: | - echo "工作目錄: $(pwd)" && ls -la - workspace: /workspace - - name: 輸出版本號 id: version - run: cat VERSION.txt >> $GITHUB_OUTPUT - workspace: ${{ github.workspace }} + uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.2.0 test: name: "TEST > 測試專案" runs-on: docker diff --git a/action.yaml b/action.yaml index 6588104..d6575ad 100644 --- a/action.yaml +++ b/action.yaml @@ -1,6 +1,9 @@ name: 'CALCULATE VERSION' description: '計算版本號' author: 'Jeffery' +outputs: + version: + description: '計算出的版本號' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index afe41b1..f2949ca 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -70,5 +70,5 @@ PATCH=$((PATCH + 1)) # 組合新的版本號,並顯示 NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION" -# 將版本輸出到環境變數 -echo "version=$NEW_VERSION" > VERSION.txt \ No newline at end of file +# 將版本輸出到 GITHUB_OUTPUT +echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT" \ No newline at end of file -- 2.48.1