md-view-go/.woodpecker/.build.yml

38 lines
875 B
YAML

steps:
- name: build
image: golang:1.21.6
commands:
- go mod tidy
- go mod download
- go build -o md-view-go
- name: docker
image: plugins/docker:20.17.3
settings:
repo: omv.lll.net:5000/lianglianglee/md-view-go
registry: omv.lll.net:5000
insecure: true
tags:
- latest
- ${CI_PREV_PIPELINE_CREATED}
- name: deploy
image: appleboy/drone-ssh
settings:
host:
- blog.lll.net
username: root
password:
from_secret: ssh_password
port: 2022
command_timeout: 2m
script:
- cd /root/learn/
- docker pull docker.lianglianglee.com/lianglianglee/md-view-go:latest
- docker compose down && docker compose up -d
when:
- environment: production
- event: deployment
depends_on:
- build
- docker