TelegramAktienBot/.drone.yml
2022-03-10 08:24:40 +01:00

48 lines
950 B
YAML

kind: pipeline
type: docker
name: linux-amd64
platform:
arch: amd64
os: linux
steps:
- name: generate_tag
image: golang
commands:
- echo -n "${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}, latest" > .tags
- name: publish
image: plugins/docker
settings:
username:
from_secret: username
password:
from_secret: password
registry:
from_secret: registry
repo:
from_secret: repo
dockerfile: Dockerfile
- name: deploy
image: appleboy/drone-ssh
network_mode: host
environment:
REPO:
from_secret: repo
IP:
from_secret: deploy_ip
NET:
from_secret: deploy_net
NAME:
from_secret: deploy_name
PLUGIN_HOST:
from_secret: ssh_host
PLUGIN_USERNAME:
from_secret: ssh_user
PLUGIN_PASSWORD:
from_secret: ssh_password
PLUGIN_SCRIPT: docker run -d --net ${NET} --ip ${IP} --hostname ${NAME} --restart unless-stopped ${REPO}