-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Webhook trigger for actions (CI) #23796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Any plans to update? |
Don't know whether Github has implemented this. |
Hope the action started / action completed / action failed webhook trigger can be set on a per-workflow basis. |
Currently looking at implementing this feature. Hoping for some guidance on what should be returned as the webhook payload for a type HookWorkflowRunAction string
const (
HookWorkflowRunRequested HookWorkflowRunAction = "requested"
HookWorkflowRunInProgress HookWorkflowRunAction = "in_progress"
HookWorkflowRunCompleted HookWorkflowRunAction = "completed"
)
type WorkflowRunPayload struct {
Action HookWorkflowRunAction `json:"action"`
Repository *Repository `json:"repository"`
Sender *User `json:"sender"`
ActionRun *ActionRun `json:"action_run"`
Artifacts *[]Artifact `json:"artifacts"`
}
type ActionRun struct {
ID int64 `json:"id"`
Title string `json:"title"`
TriggerUser *User `json:"trigger_user"`
WorkflowID string `json:"workflow_id"`
Index int64 `json:"index"`
Ref string `json:"ref"`
CommitSHA string `json:"commit_sha"`
Branch string `json:"branch"`
Status string `json:"status"`
Version int `json:"version"`
Started string `json:"time_started"`
Stopped string `json:"time_stopped"`
Created string `json:"time_created"`
Updated string `json:"time_updated"`
}
type Artifact struct {
ID int64 `json:"id"`
Name string `json:"name"`
} These structs should provide a starting point. Should this webhook provide fully formed URLs to the hook for:
Thanks! |
Have just found this #26673 which defines an The main omission from |
Why did #28047 get closed ? @lunny ? any chance this still gets implemented? would be awesome. for now a good workaround is a DIY web call with CURL using the if: always() rule: notify:
runs-on: ubuntu-latest
if: always()
steps:
- name: Notify
run: echo "Run hooks here" and then use the apis from #26673 on the receiving end |
I have no enough time to continue the work. Please pick up my code if somebody would like to continue. |
Any updates to this? It's exactly what I'm looking for but I don't have the knowledge to implement it myself |
Support for this is pretty much crucial for commercial use. |
Feature Description
I'm missing a webhook trigger for CI builds, i.e. action started / action completed / action failed. It would be great if this was a thing.
I'm sorry if this was requested before. Thanks in advance.
Screenshots
No response
The text was updated successfully, but these errors were encountered: