Fix git tag detection in Docker publish workflow

- Fetch full git history for tags
- Add debug output for found tag
- Enable proper tag resolution
This commit is contained in:
yangdx 2025-09-05 01:11:48 +08:00
parent e16c302f5f
commit 09334ca8db

View file

@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for tags
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -30,6 +32,7 @@ jobs:
id: get_tag
run: |
TAG=$(git describe --tags --abbrev=0)
echo "Found tag: $TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Extract metadata for Docker