5 Commits
0.0.4 ... main

Author SHA1 Message Date
41e254f732 specify platform to pick runner
Some checks failed
continuous-integration/drone/push Build is failing
2025-09-28 03:49:03 +05:30
7ebdfede12 added custom trigger
Some checks reported errors
continuous-integration/drone Build was killed
2025-09-28 02:43:47 +05:30
bb7a2fd08e fixes in .drone.yml 2025-09-28 02:37:51 +05:30
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 28 additions and 9 deletions

View File

@@ -3,15 +3,32 @@ kind: pipeline
type: docker
name: default
# Platform specification for ARM64 runners
platform:
os: linux
arch: arm64
steps:
# Step 1: Install dependencies & build Node.js app
- name: install-and-build
image: node:20-alpine
# Step 1: Check if Docker image for current version already exists
- name: check-version
image: docker:24
environment:
DOCKER_HOST: unix:///var/run/docker.sock
commands:
- echo "Installing dependencies..."
- npm ci
- echo "Building app..."
- npm run build
- apk add --no-cache git
- git fetch --tags
- |
# 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:$LATEST_TAG not found — building..."
fi
# Step 2: Build Docker image with dynamic Git tag
- name: build-image
@@ -50,4 +67,6 @@ steps:
# Trigger pipeline on Git tags
trigger:
event:
- push
- tag
- custom

View File

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

View File

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