homepage/.drone.yml
matti 2dad707a89 add notification template
call an webhookendpoint in our n8n installation and notify over signal-cli API
2022-12-01 15:22:01 +00:00

57 lines
1.1 KiB
YAML

kind: pipeline
name: homepage
steps:
- name: build and publish
image: plugins/docker
settings:
registry: codeberg.org
username:
from_secret: registry_username
password:
from_secret: registry_password
repo: codeberg.org/angestoepselt/homepage
build_args:
- SITE=angestoepselt
tags: ${DRONE_BRANCH}
trigger:
branch:
- main
- captcha
- name: deploy stage build
image: plugins/webhook
settings:
urls:
from_secret: portainer_stage_url
trigger:
branch:
- captcha
- name: deploy live build
image: plugins/webhook
settings:
urls:
from_secret: portainer_main_url
trigger:
branch:
- main
- name: send notification
image: plugins/webhook
settings:
urls:
from_secret: DRONE_WEBHOOK_ENDPOINT
username: drone
password:
from_secret: DRONE_WEBHOOK_SECRET
content_type: application/json
template: |
{
"branch": "{{ build.branch }}",
"author": "{{ build.author }}",
"event": "{{ build.event }}",
"status": "{{ build.status }}",
"owner": "{{ repo.owner }}",
"repo": "{{ repo.name }}"
}