Open luisg123v opened 1 year ago
@antonag32
Could you check if github has webhooks to trigger notification to runbot when an action finishes then add the custom change to runbot in order to process it to mark the build as image-built, please?
For the record. Github supports Webhooks that can be triggered when a workflow's state has changed. I tested in on a repository of mine, and this is the sort of data Github sends to the server:
{
"action": "completed",
"workflow_job": {
"id": 12699228889,
"run_id": 4681247436,
"workflow_name": "QA",
"head_branch": "15.0",
"run_url": "https://api.github.com/repos/antonag32/opa/actions/runs/4681247436",
"run_attempt": 2,
"node_id": "CR_kwDOHBZP9c8AAAAC9O7a2Q",
"head_sha": "906d5adb0ce6155e47e5e52917fc9251c2fd1eb9",
"url": "https://api.github.com/repos/antonag32/opa/actions/jobs/12699228889",
"html_url": "https://github.com/antonag32/opa/actions/runs/4681247436/jobs/8293660504",
"status": "completed",
"conclusion": "success",
"created_at": "2023-04-12T17:41:51Z",
"started_at": "2023-04-12T17:41:58Z",
"completed_at": "2023-04-12T17:42:15Z",
"name": "pre-commit (3.11)",
...
}
It sends much more data but I think this is the only relevant part. If we used this hook on something like addons-vauxoo, the name we would be looking for would be build_docker
and a completed
status.
Knowing this I will now start to work on implementing the webhook listener on runbot, in order to mark the image as built.
Since we migrated GitHub to use vxci instead of MQT, the
t2d --deployv
option needs to be used, specially in version 16.0.Such option is currently supported only in GitLab, it works when the job
build_docker
finishes, Runbot is notified.CC @moylop260 @antonag32 @desdelinux @rolandojduartem