From 697311db2d83ef3cd88ecd4c196d2c00320a100a Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 20 Mar 2026 17:47:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E7=84=A1?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yaml | 3 --- entrypoint.sh | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index d6575ad..6588104 100644 --- a/action.yaml +++ b/action.yaml @@ -1,9 +1,6 @@ name: 'CALCULATE VERSION' description: '計算版本號' author: 'Jeffery' -outputs: - version: - description: '計算出的版本號' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 8da141c..afe41b1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,4 +71,4 @@ PATCH=$((PATCH + 1)) NEW_VERSION="$MAJOR.$MINOR.$PATCH" && echo "NEW_VERSION=$NEW_VERSION" # 將版本輸出到環境變數 -echo "version=$NEW_VERSION" > /workspace/VERSION.txt \ No newline at end of file +echo "version=$NEW_VERSION" > VERSION.txt \ No newline at end of file From fb052a75c49a7f5c47f421cbf2d95589ef961040 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 20 Mar 2026 18:03:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?test:=20=E4=BD=BF=E7=94=A8=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=9A=84=E5=9F=B7=E8=A1=8C=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/master.yaml | 18 +++++------------- action.yaml | 3 +++ entrypoint.sh | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml index 0f24e2c..61e85c2 100644 --- a/.gitea/workflows/master.yaml +++ b/.gitea/workflows/master.yaml @@ -5,12 +5,12 @@ on: jobs: cd: name: "CD > 發布專案" - runs-on: docker + runs-on: ubuntu steps: - name: 發布專案 uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }} with: - tag_name: "v0.2.1" + tag_name: "v0.2.2" - name: 清理舊版本 (保留最新2個) uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} with: @@ -19,25 +19,17 @@ jobs: token: ${{ secrets.GITEA_TOKEN }} test-calculate: name: "TEST > 計算版本號" - runs-on: docker + runs-on: ubuntu needs: cd outputs: version: ${{ steps.version.outputs.version }} steps: - name: 計算版本號 - uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.2.1 - - name: 顯示工作目錄 - run: | - echo "工作目錄: $(pwd)" - ls -la $(pwd) - working-directory: ${{ github.workspace }} - - name: 輸出版本號 id: version - run: cat VERSION.txt >> $GITHUB_OUTPUT - working-directory: ${{ github.workspace }} + uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.2.2 test: name: "TEST > 測試專案" - runs-on: docker + runs-on: ubuntu needs: test-calculate steps: - name: 顯示版本號 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..eb7eab4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,4 +71,4 @@ 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 +echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT \ No newline at end of file