Skip to content

Commit 783f688

Browse files
committed
Simplify Docker build workflow tag detection
- Combine release and RC version detection into single regex pattern - Remove separate logic for release vs RC versions - Use unified pattern: ^v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$
1 parent 1f45d61 commit 783f688

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

.github/workflows/docker-build.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,7 @@ jobs:
2626
run: |
2727
git fetch --tags
2828
29-
# First try to find the latest release (non-RC) version
30-
RELEASE_TAG=$(git tag | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$' | sort -V | tail -1)
31-
32-
if [ -n "$RELEASE_TAG" ]; then
33-
# Use the latest release if it exists
34-
LATEST_TAG="$RELEASE_TAG"
35-
else
36-
# Fall back to the latest RC version
37-
LATEST_TAG=$(git tag | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+-rc\.[0-9]\+$' | sort -V | tail -1)
38-
fi
39-
29+
LATEST_TAG=$(git tag | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+(-rc\.[0-9]\+)?$' | sort -V | tail -1)
4030
if [ -z "$LATEST_TAG" ]; then
4131
echo "No version tags found"
4232
exit 1

0 commit comments

Comments
 (0)