diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml index d4e4d89..95fa62c 100644 --- a/.gitea/workflows/master.yaml +++ b/.gitea/workflows/master.yaml @@ -26,27 +26,27 @@ jobs: COMMIT_SHA: ${{ gitea.event.commits[1].id }} # deploy job 的步驟。 steps: - # 顯示 Gitea context。 - - name: Show Gitea Context - # 將 context 格式化輸出。 - run: echo "$GITEA_CONTEXT" | jq . - # 取回完整原始碼與 tags。 - - name: Source Code Checkout - # 使用 checkout action。 - uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} - # checkout 參數。 - with: - # 取得完整歷史。 - fetch-depth: 0 - # 一併抓取 tags。 - fetch-tags: true - # 查詢指定 commit 對應的 tag。 - - name: Get Commit Tag - # 供後續步驟讀取輸出。 - id: commit - # 把查到的 tag 寫入 action 輸出。 - run: echo "tag=$(git describe --contains ${{ env.COMMIT_SHA }})" >> $GITEA_OUTPUT - # 顯示剛查到的 tag。 - - name: Show Tag - # 將 tag 印到 log。 - run: echo "${{ steps.commit.outputs.tag }}" + # 顯示 Gitea context。 + - name: Show Gitea Context + # 將 context 格式化輸出。 + run: echo "$GITEA_CONTEXT" | jq . + # 取回完整原始碼與 tags。 + - name: Source Code Checkout + # 使用 checkout action。 + uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} + # checkout 參數。 + with: + # 取得完整歷史。 + fetch-depth: 0 + # 一併抓取 tags。 + fetch-tags: true + # 查詢指定 commit 對應的 tag。 + - name: Get Commit Tag + # 供後續步驟讀取輸出。 + id: commit + # 把查到的 tag 寫入 action 輸出。 + run: echo "tag=$(git describe --contains ${{ env.COMMIT_SHA }})" >> $GITEA_OUTPUT + # 顯示剛查到的 tag。 + - name: Show Tag + # 將 tag 印到 log。 + run: echo "${{ steps.commit.outputs.tag }}"