Add webhook
This commit is contained in:
parent
29d283d341
commit
2ca81c05e4
@ -9,3 +9,5 @@ renovate_git_token: ""
|
||||
renovate_platform: gitea
|
||||
renovate_github_token: ""
|
||||
renovate_log_level: info
|
||||
renovate_bot_username: renovate-bot
|
||||
renovate_webhook_secret: ""
|
@ -1,2 +1,6 @@
|
||||
---
|
||||
# handlers file for ansible-renovate-role
|
||||
- name: Restart webhook
|
||||
service:
|
||||
name: webhook
|
||||
state: restarted
|
@ -6,6 +6,11 @@
|
||||
name: python3-pip
|
||||
state: present
|
||||
|
||||
- name: Install webhook
|
||||
package:
|
||||
name: webhook
|
||||
state: present
|
||||
|
||||
- name: Install requirements
|
||||
pip:
|
||||
name: '{{ item.name }}'
|
||||
@ -43,3 +48,12 @@
|
||||
job: "/etc/renovate/renovate"
|
||||
cron_file: renovate
|
||||
user: root
|
||||
|
||||
- name: add webhook conf
|
||||
template:
|
||||
src: webhook.conf.j2
|
||||
dest: /etc/webhook.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
notify: Restart webhook
|
24
templates/webhook.conf.j2
Normal file
24
templates/webhook.conf.j2
Normal file
@ -0,0 +1,24 @@
|
||||
- id: renovate
|
||||
execute-command: "/etc/renovate/renovate"
|
||||
pass-arguments-to-command:
|
||||
- source: string
|
||||
name: --autodiscover
|
||||
- source: string
|
||||
name: false
|
||||
- source: payload
|
||||
name: repository.full_name
|
||||
trigger-rule:
|
||||
and:
|
||||
- not:
|
||||
match:
|
||||
type: value
|
||||
value: {{ renovate_bot_username }}
|
||||
parameter:
|
||||
source: payload
|
||||
name: sender.login
|
||||
- match:
|
||||
type: value
|
||||
value: {{ renovate_webhook_secret }}
|
||||
parameter:
|
||||
source: payload
|
||||
name: secret
|
Loading…
Reference in New Issue
Block a user