-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
27 lines (24 loc) · 893 Bytes
/
action.yml
File metadata and controls
27 lines (24 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: NotifyBot
description: "Submit webhook with job status"
author: "germesdev"
inputs:
endpoint:
description: "An endpoint for webhook"
required: true
step:
description: "A step name"
required: true
runs:
using: "composite"
steps:
- id: webhook
run: |
ENDPOINT="${{ inputs.endpoint }}"
STATUS="${{ job.status }}"
STEP="${{ inputs.step }}"
MSG=$(git log --format=%s -n 1 ${{ github.event.after }})
curl -so /dev/null -w '%{response_code}' -X POST -H "Content-Type: application/json" --data "{ \"commit\": \"https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA/checks\", \"repository\": \"$GITHUB_REPOSITORY\", \"status\": \"$STATUS\", \"actor\": \"$GITHUB_ACTOR\", \"step\": \"$STEP\", \"branch\": \"$GITHUB_REF\", \"msg\": \"$MSG\" }" $ENDPOINT
shell: bash
branding:
icon: "send"
color: "gray-dark"