Some changes

This commit is contained in:
2022-09-17 23:23:21 +02:00
parent 709b9ca570
commit d03cdccb62
5 changed files with 26 additions and 48 deletions

47
.woodpecker.yml Normal file
View File

@@ -0,0 +1,47 @@
pipeline:
generate_docker_tag:
image: golang
commands:
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
when:
event: push
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo:
from_secret: repo
username:
from_secret: username
password:
from_secret: password
registry:
from_secret: registry
dockerfile: source/Dockerfile
platforms: linux/amd64
when:
event: push
deploy:
image: appleboy/drone-ssh
network_mode: host
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
port:
from_secret: ssh_port
script:
- cd ~/docker-compose-files/guess_the_price
- docker-compose pull
- docker-compose --env-file ~/docker-compose-env/guess_the_price.env up -d
when:
event: push
branches: main