feat: add trigger to pipeline

This commit is contained in:
2023-09-20 21:58:23 +02:00
parent 8a8b62b249
commit ca32c5a041

View File

@@ -3,6 +3,12 @@ type: docker
name: build-and-push-container
triggers:
branch:
- main
event:
- push
steps:
- name: build
image: docker:20
@@ -10,11 +16,6 @@ steps:
- 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
ref:
- refs/heads/main
- name: push
image: plugins/docker
@@ -27,8 +28,3 @@ steps:
tags:
- latest
- $COMMIT_HASH
when:
event:
- push
ref:
- refs/heads/main