fix pipeline
continuous-integration/drone/push Build is passing Details

This commit is contained in:
user-penguin 2023-09-12 23:50:22 +07:00
parent 5c66bd5987
commit 941fe07084
1 changed files with 10 additions and 2 deletions

View File

@ -13,10 +13,18 @@ steps:
- name: build - name: build
pull: if-not-exists pull: if-not-exists
image: golang:1.20 image: golang:1.20
environment:
TELEGRAM_TOKEN:
from_secret: TELEGRAM_TOKEN
POSTGRES_URL_CONNECT:
from_secret: POSTGRES_URL_CONNECT
settings:
envs: [ TELEGRAM_TOKEN,POSTGRES_URL_CONNECT ]
commands: commands:
- GOOS=linux GOARCH=amd64 go build -o butler cmd/butler/main.go - GOOS=linux GOARCH=amd64 go build -o butler cmd/butler/main.go
- touch .env - touch .env
- echo TELEGRAM_TOKEN=AAAAAAAA >> .env - echo TELEGRAM_TOKEN=$${TELEGRAM_TOKEN} >> .env
- echo POSTGRES_URL_CONNECT=$${POSTGRES_URL_CONNECT} >> .env
- name: copy to server - name: copy to server
pull: if-not-exists pull: if-not-exists
@ -34,7 +42,7 @@ steps:
source: source:
- .env - .env
- build/ci/Dockerfile - build/ci/Dockerfile
- deploy/docker-compose.yml docker-compose.yml - deploy/docker-compose.yml
- migrations - migrations
- cmd - cmd
rm: true rm: true