feat: include commit has in image tag (#2)
All checks were successful
continuous-integration/drone Build is passing

Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2023-09-20 21:51:27 +02:00
parent acd1f2efef
commit 8a8b62b249

View File

@@ -7,7 +7,9 @@ steps:
- name: build
image: docker:20
commands:
- docker build -t gitea.t000-n.de/t.behrendt/backupsidecar:latest .
- COMMIT_HASH=$(git rev-parse --short HEAD)
- IMAGE_TAG=gitea.t000-n.de/t.behrendt/backupsidecar:$COMMIT_HASH
- docker build -t $IMAGE_TAG .
when:
event:
- push
@@ -22,7 +24,9 @@ steps:
password:
from_secret: REGISTRY_PASSWORD
repo: gitea.t000-n.de/t.behrendt/backupsidecar
tags: latest
tags:
- latest
- $COMMIT_HASH
when:
event:
- push