Files
backupsidecar/.drone.yaml
t.behrendt bef0763de8
Some checks failed
continuous-integration/drone Build is failing
feat: add trigger to pipeline (#3)
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Reviewed-on: #3
2023-09-20 21:58:48 +02:00

31 lines
602 B
YAML

kind: pipeline
type: docker
name: build-and-push-container
triggers:
branch:
- main
event:
- push
steps:
- name: build
image: docker:20
commands:
- COMMIT_HASH=$(git rev-parse --short HEAD)
- IMAGE_TAG=gitea.t000-n.de/t.behrendt/backupsidecar:$COMMIT_HASH
- docker build -t $IMAGE_TAG .
- name: push
image: plugins/docker
settings:
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
repo: gitea.t000-n.de/t.behrendt/backupsidecar
tags:
- latest
- $COMMIT_HASH