Using triggers for pipelines.

This commit is contained in:
Alexey Skobkin 2024-11-21 23:59:56 +03:00
parent 1c0c7af3f9
commit 9654018b77
No known key found for this signature in database
GPG key ID: 5D5CEF6F221278E7

View file

@ -1,25 +1,26 @@
kind: pipeline
type: docker
name: build-pr
name: build
steps:
- name: build
- name: 'docker_build'
image: plugins/docker
settings:
dry_run: true
purge: true
when:
event:
- pull_request
- push
trigger:
event:
- pull_request
- push
---
kind: pipeline
type: docker
name: build-and-publish
name: publish
steps:
- name: publish
- name: 'docker_publish'
image: plugins/docker
settings:
username:
@ -31,6 +32,6 @@ steps:
tags:
- ${DRONE_TAG}
- latest
when:
event:
- tag
trigger:
event:
- tag