From 941fe07084aa8e744a614943b6577ae02f08bf8a Mon Sep 17 00:00:00 2001 From: user-penguin Date: Tue, 12 Sep 2023 23:50:22 +0700 Subject: [PATCH] fix pipeline --- build/ci/.drone.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build/ci/.drone.yml b/build/ci/.drone.yml index 0783749..94d2cf3 100644 --- a/build/ci/.drone.yml +++ b/build/ci/.drone.yml @@ -13,10 +13,18 @@ steps: - name: build pull: if-not-exists 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: - GOOS=linux GOARCH=amd64 go build -o butler cmd/butler/main.go - 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 pull: if-not-exists @@ -34,7 +42,7 @@ steps: source: - .env - build/ci/Dockerfile - - deploy/docker-compose.yml docker-compose.yml + - deploy/docker-compose.yml - migrations - cmd rm: true