refactor(rulebook): rulebook should share playbook name

ref: #3 #1
This commit is contained in:
2025-07-01 23:25:47 +09:30
parent 27fcf1fde4
commit 9f3b07c9f8

View File

@ -0,0 +1,41 @@
---
- name: Inbound Webhook
hosts: localhost
match_multiple_rules: true
sources:
- name: Webhook
ansible.eda.webhook:
host: 0.0.0.0
port: "{{ PROBLEM_MATCHER_PORT | default(5000) | int }}"
token: "{{ PROBLEM_MATCHER_TOKEN | default('-not-set-') }}"
rules:
- name: Show workflow_job Action
condition: >
event.meta.headers['X-GitHub-Event'] == 'workflow_job'
actions:
- debug:
msg: |-
Received workflow_job event from {{ event.payload.sender.username + ' ' -}}
for repository {{ event.payload.repository.full_name + ' ' -}}
with action of {{ event.payload.action }}
- name: Process Completed workflow_job
condition: >
event.meta.headers['X-GitHub-Event'] == 'workflow_job'
and
event.payload.action == 'completed'
actions:
- run_playbook:
name: nofusscomputing.git_events.problem_matcher
verbosity: 2
extra_vars:
payload: "{{ event.payload }}"
ansible_connection: local