update notifications in workflows
This commit is contained in:
parent
7dcdb2dd9e
commit
4a6ba85539
@ -6,8 +6,6 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
FULL_TAG: git.mrmeeb.stream/mrmeeb/gitea-act-runner:develop
|
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:
|
jobs:
|
||||||
"Build Image":
|
"Build Image":
|
||||||
@ -32,18 +30,33 @@ jobs:
|
|||||||
provenance: false
|
provenance: false
|
||||||
"Notify":
|
"Notify":
|
||||||
runs-on: ubuntu-docker-latest
|
runs-on: ubuntu-docker-latest
|
||||||
if: ${{ always() }}
|
|
||||||
needs: ["Build Image"]
|
|
||||||
steps:
|
|
||||||
- name: Notify of outcome
|
|
||||||
uses: appleboy/discord-action@master
|
|
||||||
if: always()
|
if: always()
|
||||||
env:
|
needs: ["Build Image", "Test Image", "Push Image"]
|
||||||
DISCORD_COLOR: "${{ job.status == 'success' && '#48f442' || '#f44336' }}"
|
steps:
|
||||||
DISCORD_MESSAGE: "${{ gitea.job }} on ${{ gitea.repository }} has ${{ job.status == 'success' && 'succeeded' || 'failed.' }}"
|
- name: Success
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: success()
|
||||||
with:
|
with:
|
||||||
webhook_id: ${{ secrets.WEBHOOK_ID }}
|
severity: info
|
||||||
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
|
details: Build succeeded!
|
||||||
color: ${{ env.DISCORD_COLOR }}
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
username: "Gitea Bot"
|
username: Gitea
|
||||||
message: ${{ env.DISCORD_MESSAGE }}
|
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