fixes in .drone.yml
This commit is contained in:
13
.drone.yml
13
.drone.yml
@@ -12,14 +12,17 @@ steps:
|
||||
commands:
|
||||
- apk add --no-cache git
|
||||
- git fetch --tags
|
||||
- LATEST_TAG=$(git describe --tags --abbrev=0)
|
||||
- echo "Latest Git tag: $LATEST_TAG"
|
||||
- |
|
||||
if docker image inspect apps/homepage:$NEW_VERSION > /dev/null 2>&1; then
|
||||
echo "Docker image apps/homepage:$NEW_VERSION already exists — skipping build"
|
||||
# Get the latest Git tag
|
||||
LATEST_TAG=$(git describe --tags --abbrev=0)
|
||||
echo "Latest Git tag: $LATEST_TAG"
|
||||
|
||||
# Check if Docker image exists
|
||||
if docker image inspect apps/homepage:$LATEST_TAG > /dev/null 2>&1; then
|
||||
echo "Docker image apps/homepage:$LATEST_TAG already exists — skipping build"
|
||||
exit 0
|
||||
else
|
||||
echo "Docker image apps/homepage:$NEW_VERSION not found — building..."
|
||||
echo "Docker image apps/homepage:$LATEST_TAG not found — building..."
|
||||
fi
|
||||
|
||||
# Step 2: Build Docker image with dynamic Git tag
|
||||
|
Reference in New Issue
Block a user