diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml index cf761d8..9165be0 100644 --- a/.gitea/workflows/master.yaml +++ b/.gitea/workflows/master.yaml @@ -6,21 +6,24 @@ jobs: cd: name: "CD > 發布專案" runs-on: docker - env: - RUNNER_TOOL_CACHE: /toolcache steps: - name: 發布專案 uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }} with: - tag_name: "v0.1.1" + tag_name: "v0.1.2" - name: 計算版本號 id: version uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.1.1 - - name: 顯示資訊 - run: echo ${{ needs.version.outputs.version }} - name: 清理舊版本 (保留最新2個) uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} with: gitea-server: ${{ gitea.server_url }} repository: ${{ gitea.repository }} - token: ${{ secrets.GITEA_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITEA_TOKEN }} + test: + needs: cd + name: "TEST > 測試專案" + runs-on: docker + steps: + - name: 顯示版本號 + run: echo ${{ needs.cd.outputs.version }} \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 83638cb..cf9c246 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -70,5 +70,8 @@ PATCH=$((PATCH + 1)) # 組合新的版本號 NEW_VERSION="$MAJOR.$MINOR.$PATCH" +# 確保 GITHUB_OUTPUT 檔案的目錄存在 +mkdir -p "$(dirname "$GITHUB_OUTPUT")" + # 將版本輸出到環境變數 echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT \ No newline at end of file