-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sangeet-joy_xero
committed
Oct 17, 2024
1 parent
37bbe4a
commit 19c3d77
Showing
2 changed files
with
38 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ inputs: | |
job_status: | ||
required: true | ||
description: "status of the job" | ||
XERO_SLACK_WEBHOOK_URL: | ||
required: true | ||
description: "webhook url for channel - public-sdk-events" | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -25,36 +28,36 @@ runs: | |
echo ${{github.repository}} | ||
echo ${{github.sha}} | ||
# - name: Send slack notification | ||
# id: slack | ||
# uses: slackapi/[email protected] | ||
# env: | ||
# SLACK_WEBHOOK_URL: "" | ||
# with: | ||
# payload: | | ||
# { | ||
# "channel": "#public-sdk-events", | ||
# "text": ${{inputs.heading_text}} | ||
# "attachments": [ | ||
# { | ||
# "color": ${{inputs.alert_type}}, | ||
# "fields": [ | ||
# { | ||
# "title": "Repository", | ||
# "value": "${{github.repository}}" | ||
# "short": true | ||
# }, | ||
# { | ||
# "title": "Job Status", | ||
# "value": "${{inputs.job_status}}" | ||
# "short": true | ||
# }, | ||
# { | ||
# "title": "commit", | ||
# "value": "${{github.sha}}" | ||
# "short": true | ||
# }, | ||
# ] | ||
# } | ||
# ] | ||
# } | ||
- name: Send slack notification | ||
id: slack | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_WEBHOOK_URL: ${{inputs.XERO_SLACK_WEBHOOK_URL}} | ||
with: | ||
payload: | | ||
{ | ||
"channel": "#public-sdk-events", | ||
"text": ${{inputs.heading_text}} | ||
"attachments": [ | ||
{ | ||
"color": ${{inputs.alert_type}}, | ||
"fields": [ | ||
{ | ||
"title": "Repository", | ||
"value": "${{github.repository}}" | ||
"short": true | ||
}, | ||
{ | ||
"title": "Job Status", | ||
"value": "${{inputs.job_status}}" | ||
"short": true | ||
}, | ||
{ | ||
"title": "commit", | ||
"value": "${{github.sha}}" | ||
"short": true | ||
}, | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters