2 Commits
0.0.4 ... 0.0.5

Author SHA1 Message Date
4058796b50 minor changes
Some checks reported errors
continuous-integration/drone Build encountered an error
2025-09-28 02:34:04 +05:30
54d72b4d66 intelligent check for new tags before building 2025-09-28 02:33:48 +05:30
3 changed files with 19 additions and 9 deletions

View File

@@ -4,14 +4,23 @@ type: docker
name: default name: default
steps: steps:
# Step 1: Install dependencies & build Node.js app # Step 1: Check if Docker image for current version already exists
- name: install-and-build - name: check-version
image: node:20-alpine image: docker:24
environment:
DOCKER_HOST: unix:///var/run/docker.sock
commands: commands:
- echo "Installing dependencies..." - apk add --no-cache git
- npm ci - git fetch --tags
- echo "Building app..." - LATEST_TAG=$(git describe --tags --abbrev=0)
- npm run build - 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"
exit 0
else
echo "Docker image apps/homepage:$NEW_VERSION not found — building..."
fi
# Step 2: Build Docker image with dynamic Git tag # Step 2: Build Docker image with dynamic Git tag
- name: build-image - name: build-image
@@ -50,4 +59,5 @@ steps:
# Trigger pipeline on Git tags # Trigger pipeline on Git tags
trigger: trigger:
event: event:
- push
- tag - tag

View File

@@ -5,7 +5,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
# network: host # network: host
container_name: homepage container_name: homepage
image: apps/homepage:0.0.3 image: apps/homepage:0.0.5
ports: ports:
- "3001:3000" # map host port 3000 to container - "3001:3000" # map host port 3000 to container
environment: environment:

View File

@@ -1,5 +1,5 @@
{ {
"name": "material-ui-react-router-ts", "name": "homepage",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {