Update .drone.yml
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
2025-10-21 13:50:13 +00:00
parent 49d1e241c3
commit 23bce67595

View File

@@ -15,6 +15,7 @@ volumes:
host:
path: /var/run/docker.sock
steps:
steps:
- name: fetch-tags
image: docker:24
@@ -25,13 +26,22 @@ steps:
- apk add --no-cache git
- git fetch --tags
- |
# Get latest Git tag and trim newline
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null | tr -d '\n')
if [ -z "$LATEST_TAG" ]; then
echo "Latest Git tag fetched: $LATEST_TAG"
# Save to file for downstream steps
echo "$LATEST_TAG" > /drone/src/LATEST_TAG.txt
# Read back for verification
IMAGE_TAG=$(cat /drone/src/LATEST_TAG.txt | tr -d '\n')
echo "Image tag read from file: $IMAGE_TAG"
# Validate
if [ -z "$IMAGE_TAG" ]; then
echo "❌ No git tags found! Cannot continue."
exit 1
fi
echo "Latest Git tag fetched: $LATEST_TAG"
echo "$LATEST_TAG" > /drone/src/LATEST_TAG.txt
# - name: check-remote-image
# image: docker:24