update notifications in workflows
This commit is contained in:
parent
1f17508eab
commit
11eb819e02
@ -6,8 +6,6 @@ on:
|
||||
|
||||
env:
|
||||
FULL_TAG: git.mrmeeb.stream/mrmeeb/gitea-act-runner:develop
|
||||
DISCORD_COLOUR: ${{ job.status == success && '#48f442' || '#f44336' }}
|
||||
DISCORD_STATE: ${{ job.status == success && 'succeeded' || 'failed' }}
|
||||
|
||||
jobs:
|
||||
"Build Image":
|
||||
@ -32,18 +30,33 @@ jobs:
|
||||
provenance: false
|
||||
"Notify":
|
||||
runs-on: ubuntu-docker-latest
|
||||
if: ${{ always() }}
|
||||
needs: ["Build Image"]
|
||||
if: always()
|
||||
needs: ["Build Image", "Test Image", "Push Image"]
|
||||
steps:
|
||||
- name: Notify of outcome
|
||||
uses: appleboy/discord-action@master
|
||||
if: always()
|
||||
env:
|
||||
DISCORD_COLOR: "${{ job.status == 'success' && '#48f442' || '#f44336' }}"
|
||||
DISCORD_MESSAGE: "${{ gitea.job }} on ${{ gitea.repository }} has ${{ job.status == 'success' && 'succeeded' || 'failed.' }}"
|
||||
- name: Success
|
||||
uses: rjstone/discord-webhook-notify@v1
|
||||
if: success()
|
||||
with:
|
||||
webhook_id: ${{ secrets.WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
|
||||
color: ${{ env.DISCORD_COLOR }}
|
||||
username: "Gitea Bot"
|
||||
message: ${{ env.DISCORD_MESSAGE }}
|
||||
severity: info
|
||||
details: Build succeeded!
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
username: Gitea
|
||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||
- name: Failure
|
||||
uses: rjstone/discord-webhook-notify@v1
|
||||
if: failure()
|
||||
with:
|
||||
severity: error
|
||||
details: Build failed!
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
username: Gitea
|
||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||
- name: Cancelled
|
||||
uses: rjstone/discord-webhook-notify@v1
|
||||
if: cancelled()
|
||||
with:
|
||||
severity: warn
|
||||
details: Build cancelled!
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
username: Gitea
|
||||
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
Loading…
x
Reference in New Issue
Block a user