feat: add commit hash to image tag
This commit is contained in:
@@ -11,11 +11,9 @@ triggers:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: docker:20
|
image: plugins/docker
|
||||||
commands:
|
commands:
|
||||||
- COMMIT_HASH=$(git rev-parse --short HEAD)
|
- docker build -t gitea.t000-n.de/t.behrendt/backupsidecar:${DRONE_COMMIT:0:8} .
|
||||||
- IMAGE_TAG=gitea.t000-n.de/t.behrendt/backupsidecar:$COMMIT_HASH
|
|
||||||
- docker build -t $IMAGE_TAG .
|
|
||||||
|
|
||||||
- name: push
|
- name: push
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
@@ -27,4 +25,4 @@ steps:
|
|||||||
repo: gitea.t000-n.de/t.behrendt/backupsidecar
|
repo: gitea.t000-n.de/t.behrendt/backupsidecar
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- $COMMIT_HASH
|
- ${DRONE_COMMIT:0:8}
|
||||||
|
|||||||
Reference in New Issue
Block a user