Skip to content

Commit

Permalink
testing the payload structure
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeet-joy_xero committed Oct 17, 2024
1 parent ab6395b commit 384e772
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
29 changes: 11 additions & 18 deletions .github/actions/notify-slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ inputs:
XERO_SLACK_WEBHOOK_URL:
required: true
description: "webhook url for channel - public-sdk-events"
job_url:
required: false
description: "job event link"

runs:
using: "composite"
Expand All @@ -38,26 +41,16 @@ runs:
{
"channel": "#public-sdk-events",
"text": "${{inputs.heading_text}}",
"attachments": [
"blocks": [
{
"color": "${{inputs.alert_type}}",
"type": "section",
"fields": [
{
"title": "Repository",
"value": "${{github.repository}}",
"short": true
},
{
"title": "Job Status",
"value": "${{inputs.job_status}}",
"short": true
},
{
"title": "commit",
"value": "${{github.sha}}",
"short": true
}
]
{
"title": "Repository",
"value": "${{github.repository}}",
"short": true
}
]
}
]
}
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
- name: Send slack notification on failure
uses: ./xero-node/.github/actions/notify-slack
with:
heading_text: "Publish job has failed. Check the details here: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
heading_text: "Publish job has failed !"
alert_type: "danger"
job_status: ${{job.status}}
XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}}
job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"

0 comments on commit 384e772

Please sign in to comment.