opengis/.drone.yml
Flook 26c0cf6c28
Some checks failed
continuous-integration/drone/push Build is failing
ทดสอบ CI/CD
2025-01-31 10:10:20 +07:00

37 lines
906 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: Install dependencies
image: node:18-alpine
commands:
- npm ci
- name: Build
image: node:18-alpine
commands:
- npm run build
- name: Build Docker Image
image: docker:latest
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t adminsoftwarecraft/opengis:latest .
- docker push adminsoftwarecraft/opengis:latest
- name: Deploy to Server
image: curlimages/curl:latest
environment:
WEBHOOK_URL:
from_secret: WEBHOOK_URL
WEBHOOK_SECRET:
from_secret: WEBHOOK_SECRET
commands:
- 'curl -X POST "$WEBHOOK_URL" -H "Authorization: Bearer $WEBHOOK_SECRET"'