From 9df959d98982db663aa017dcfaa91452ac908d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 4 Oct 2023 19:53:25 +0200 Subject: [PATCH] ci: automatically redeploy container --- .drone.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index cf821be..260e832 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,17 +11,20 @@ steps: - poetry install - poetry env info - poetry run pytest -- name: build container (prod) + +- name: build-prod image: plugins/docker settings: repo: registry.kucharczyk.xyz/timetracker tags: - latest + depends_on: + - "test" when: branch: - main -- name: build container (non-prod) +- name: build-non-prod image: plugins/docker settings: repo: registry.kucharczyk.xyz/timetracker @@ -30,9 +33,20 @@ steps: branch: exclude: - main + depends_on: + - "test" + +- name: redeploy on portainer + image: plugins/webhook + settings: + urls: + from_secret: PORTAINER_TIMETRACKER_WEBHOOK_URL + depends_on: + - "build-prod" + trigger: event: - push - - cron \ No newline at end of file + - cron