mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 07:27:03 +02:00
GA Slack WIP
This commit is contained in:
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@@ -49,8 +49,17 @@ jobs:
|
||||
- name: Slack Notification
|
||||
uses: 8398a7/action-slack@v3
|
||||
with:
|
||||
status: ${{ job.status }}
|
||||
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
|
||||
status: custom
|
||||
fields: workflow,job,commit,repo,ref,author,took
|
||||
custom_payload: |
|
||||
{
|
||||
username: 'action-slack',
|
||||
icon_emoji: ':octocat:',
|
||||
attachments: [{
|
||||
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
|
||||
text: `${process.env.AS_WORKFLOW}\n${process.env.AS_JOB} (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@${process.env.AS_REF} by ${process.env.AS_AUTHOR} succeeded in ${process.env.AS_TOOK}`,
|
||||
}]
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
|
||||
if: always() # Pick up events even if the job fails or is canceled.
|
||||
|
||||
Reference in New Issue
Block a user