Add webhook
This commit is contained in:
parent
29d283d341
commit
2ca81c05e4
@ -8,4 +8,6 @@ renovate_git_endpoint: ""
|
|||||||
renovate_git_token: ""
|
renovate_git_token: ""
|
||||||
renovate_platform: gitea
|
renovate_platform: gitea
|
||||||
renovate_github_token: ""
|
renovate_github_token: ""
|
||||||
renovate_log_level: info
|
renovate_log_level: info
|
||||||
|
renovate_bot_username: renovate-bot
|
||||||
|
renovate_webhook_secret: ""
|
@ -1,2 +1,6 @@
|
|||||||
---
|
---
|
||||||
# handlers file for ansible-renovate-role
|
# handlers file for ansible-renovate-role
|
||||||
|
- name: Restart webhook
|
||||||
|
service:
|
||||||
|
name: webhook
|
||||||
|
state: restarted
|
@ -6,6 +6,11 @@
|
|||||||
name: python3-pip
|
name: python3-pip
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Install webhook
|
||||||
|
package:
|
||||||
|
name: webhook
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
pip:
|
pip:
|
||||||
name: '{{ item.name }}'
|
name: '{{ item.name }}'
|
||||||
@ -42,4 +47,13 @@
|
|||||||
minute: "0"
|
minute: "0"
|
||||||
job: "/etc/renovate/renovate"
|
job: "/etc/renovate/renovate"
|
||||||
cron_file: renovate
|
cron_file: renovate
|
||||||
user: root
|
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