Changed alert msg to be sent to a slack webhook. #1929
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created an action that sends a customizable message along with some static information related to the workflow's job it is running.
It's currently used in conjunction with
if: ${{ failure() }}
to send a message to configured webhook as an alert for a failing job, but can be reused for any other purpose, as long as the webhook endpoint accepts the json object that will be sent to.The webhook is free to format the final message accordingly but these are the fields it will receive:
Where job_url, commit_url and attempt point to the job where the workflow is/was running, the commit_url of the commit that triggered the workflow and the job attempt number respectively.
Only the message is customizable by means of the step's
with.message
field. The other fields are internally set by the action.The webhook URL should be stored in a secret and passed to the
with.slack_webook
field of the step.