Skip to content

Commit 4171649

Browse files
fix: Docker workflow version extraction for manual dispatch (#359)
- Added fetch-depth: 0 and fetch-tags: true to checkout action to ensure tags are available - Added debug output to show extracted version - Fixes the empty version issue when running workflow_dispatch from main branch
1 parent 0c1e313 commit 4171649

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
fetch-tags: true
2326

2427
- name: Extract version
2528
id: version
@@ -34,6 +37,7 @@ jobs:
3437
else
3538
VERSION=${GITHUB_REF#refs/tags/v}
3639
fi
40+
echo "Extracted version: $VERSION"
3741
echo "version=$VERSION" >> $GITHUB_OUTPUT
3842
echo "major=$(echo $VERSION | cut -d. -f1)" >> $GITHUB_OUTPUT
3943
echo "minor=$(echo $VERSION | cut -d. -f1-2)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)