This commit is contained in:
12
.drone.yml
12
.drone.yml
@@ -25,8 +25,11 @@ steps:
|
|||||||
- apk add --no-cache git
|
- apk add --no-cache git
|
||||||
- git fetch --tags
|
- git fetch --tags
|
||||||
- |
|
- |
|
||||||
# Get the latest Git tag and export as a Drone env variable
|
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null | tr -d '\n')
|
||||||
export LATEST_TAG=$(git describe --tags --abbrev=0)
|
if [ -z "$LATEST_TAG" ]; then
|
||||||
|
echo "❌ No git tags found! Cannot continue."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "Latest Git tag fetched: $LATEST_TAG"
|
echo "Latest Git tag fetched: $LATEST_TAG"
|
||||||
# Make it available to downstream steps
|
# Make it available to downstream steps
|
||||||
echo "LATEST_TAG=$LATEST_TAG" >> /drone/env
|
echo "LATEST_TAG=$LATEST_TAG" >> /drone/env
|
||||||
@@ -54,11 +57,6 @@ steps:
|
|||||||
# - name: dockersock
|
# - name: dockersock
|
||||||
# path: /var/run/docker.sock
|
# path: /var/run/docker.sock
|
||||||
# commands:
|
# commands:
|
||||||
# - |
|
|
||||||
# if [ -z "$LATEST_TAG" ]; then
|
|
||||||
# echo "❌ No Git tag found — cannot build."
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
# - echo "🔨 Building Docker image apps/homepage:$LATEST_TAG ..."
|
# - echo "🔨 Building Docker image apps/homepage:$LATEST_TAG ..."
|
||||||
# - docker build --network=host -t apps/homepage:$LATEST_TAG -t apps/homepage:latest /drone/src
|
# - docker build --network=host -t apps/homepage:$LATEST_TAG -t apps/homepage:latest /drone/src
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user