add no reply prototype (not working), CI tag support

This commit is contained in:
Mauro Torrez 2019-09-30 13:15:03 -03:00
parent c9547542c9
commit 429dc2789f
3 changed files with 55 additions and 14 deletions

View File

@ -2,20 +2,6 @@
kind: pipeline
name: default
steps:
- name: build image only
image: plugins/docker
settings:
repo: eumau/postfix
auto_tag: true
dry_run: true
when:
ref:
- refs/pull/**
# event no anda (?)
# event:
# - pull_request
- name: build and publish image
image: plugins/docker
settings:
@ -28,3 +14,41 @@ steps:
when:
branch:
- master
---
kind: pipeline
name: pull_request
steps:
- name: build image only
image: plugins/docker
settings:
repo: eumau/postfix
auto_tag: true
dry_run: true
trigger:
event:
- pull_request
---
kind: pipeline
name: tags
steps:
- name: docker
image: plugins/docker
settings:
repo: eumau/postfix
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
tags:
- ${DRONE_TAG}
build_args:
- DEBIAN_VERSION=${DRONE_TAG}
trigger:
event:
- tag

View File

@ -0,0 +1,7 @@
[template]
src = "noreply.tmpl"
dest = "/etc/postfix/noreply"
keys = [
"/noreply/aliases",
"/virtual/mailbox/domains",
]

View File

@ -0,0 +1,10 @@
# "no-reply" mail aliases.
# DO NOT edit this file, it will be overwritten.
# Instead, set the variable NOREPLY_ALIASES
{{ range split (getv "/noreply/aliases") " " }}
{{ if (strings.Contains . "@") }}
{{.}} _dev_null
{{ else }}
{{.}}@{{ index (split (getv "/virtual/mailbox/domains") " ") 0 }} _dev_null
{{ end }}
{{ end }}