ci
Some checks are pending
continuous-integration/drone/push Build is pending

This commit is contained in:
2026-01-16 00:07:54 +01:00
parent a7bb387566
commit e26afc652b

46
.drone.yml Normal file
View File

@@ -0,0 +1,46 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: docker:27-cli
volumes:
- name: dockersock
path: /var/run/docker.sock
environment:
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASS:
from_secret: REGISTRY_PASS
commands:
- echo "$REGISTRY_PASS" | docker login registry.infra.mintel.me -u "$REGISTRY_USER" --password-stdin
- docker build -t registry.infra.mintel.me/mintel/mb-grid-solutions:latest .
- docker push registry.infra.mintel.me/mintel/mb-grid-solutions:latest
when:
branch:
- main
event:
- push
- name: deploy
image: alpine
environment:
ALPHA_SSH_KEY:
from_secret: ALPHA_SSH_KEY
commands:
- apk add --no-cache openssh
- mkdir -p ~/.ssh
- echo "$ALPHA_SSH_KEY" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- ssh -o StrictHostKeyChecking=no deploy@alpha.mintel.me "cd /opt/alpha/sites/mb-grid-solutions && docker compose pull && docker compose up -d"
when:
branch:
- main
event:
- push
volumes:
- name: dockersock
host:
path: /var/run/docker.sock