shbot/.drone.yml
Aaron Riedel 43a01a753b
All checks were successful
continuous-integration/drone/push Build is passing
fix container registry
2023-12-24 20:29:10 +01:00

77 lines
No EOL
1.5 KiB
YAML

kind: pipeline
name: deploy
steps:
- name: docker
image: plugins/docker
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/secondhemd/shbot
tags: latest
when:
branch:
- master
- name: docker-build
image: plugins/docker
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/secondhemd/shbot
tags: latest
dry_run: true
when:
branch:
exclude:
- master
- name: dev docker
image: plugins/docker
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/secondhemd/shbot
tags: dev
when:
branch:
- dev
- name: deploy
image: appleboy/drone-ssh
settings:
host:
- s.ar21.de
username: root
key:
from_secret: DEPLOY_SSH_KEY
port: 22
command_timeout: 2m
script:
- cd /root && docker compose pull shbot && docker compose up -d shbot
when:
branch:
- master
- name: deploy dev
image: appleboy/drone-ssh
settings:
host:
- s.ar21.de
username: root
key:
from_secret: DEPLOY_SSH_KEY
port: 22
command_timeout: 2m
script:
- cd /root && docker compose -f shbot-dev.yaml pull shbot-dev && docker compose -f shbot-dev.yaml up -d shbot-dev
when:
branch:
- dev
when:
event:
- push