Compare commits

..
1 Commits
Author SHA1 Message Date
jiantw83 15c1228316 style(.gitea/workflows/master): 對齊工作流程註解與縮排
CI / 1. BUILD (pull_request) Successful in 2s
CI / 2. TEST (pull_request) Has been skipped
CI / 3. RESULT (pull_request) Has been skipped
2026-07-11 12:58:45 +00:00
+24 -24
View File
@@ -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 }}"