Separate Docker container by branch
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Lukáš Kucharczyk 2023-01-25 11:36:34 +01:00
parent 1741397ee7
commit 9654fb017d
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 19 additions and 4 deletions

View File

@ -11,15 +11,30 @@ steps:
- poetry install - poetry install
- poetry env info - poetry env info
- poetry run pytest - poetry run pytest
- name: build container - name: build container (prod)
image: plugins/docker image: plugins/docker
settings: settings:
repo: registry.kucharczyk.xyz/timetracker repo: registry.kucharczyk.xyz/timetracker
tags: tags:
- latest - latest
when:
branch:
- main
- name: build container (non-prod)
image: plugins/docker
settings:
repo: registry.kucharczyk.xyz/timetracker
tags:
- ${DRONE_COMMIT_REF}
- ${DRONE_COMMIT_BRANCH}
when:
branch:
exclude:
- main
trigger: trigger:
event: event:
- push - push
- cron - cron
exclude:
- pull_request