Files
calculate-version/.gitea/workflows/master.yaml
T
jiantw83 8d6672e5a3
CI / 1. BUILD (pull_request) Successful in 2s
CI / 2. TEST (pull_request) Successful in 1s
CI / 3. RESULT (pull_request) Successful in 1s
fix(CD 工作流程): 改為選取包含 commit 的最新 tag
2026-07-11 05:54:50 +00:00

22 lines
584 B
YAML

name: CD
on:
push:
branches:
- master
jobs:
deploy:
name: DEPLOY
runs-on: ubuntu
env:
COMMIT_SHA: ${{ gitea.event.commits[1].id }}
steps:
- name: Source Code Checkout
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
with:
fetch-depth: 0
- name: Get Commit Tag
id: commit
run: echo "tag=$(git for-each-ref --sort=-creatordate --format='%(refname:strip=2)' refs/tags --contains ${{ env.COMMIT_SHA }} | head -n 1)" >> $GITEA_OUTPUT
- name: Show Tag
run: echo "${{ steps.commit.outputs.tag }}"