CI fix tentative #18
This commit is contained in:
parent
763dcdd1d0
commit
12531da5aa
1 changed files with 28 additions and 11 deletions
|
|
@ -77,7 +77,8 @@ jobs:
|
|||
needs: build
|
||||
runs-on: docker
|
||||
strategy:
|
||||
include: *site_matrix
|
||||
matrix:
|
||||
include: *site_matrix
|
||||
|
||||
steps:
|
||||
- name: Setup SSH
|
||||
|
|
@ -105,16 +106,32 @@ jobs:
|
|||
if: always() # Always run
|
||||
steps:
|
||||
- name: Send Discord Notification
|
||||
uses: https://github.com/appleboy/discord-action@master
|
||||
with:
|
||||
color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
|
||||
message: |
|
||||
**Deployment Report**
|
||||
**Status:** ${{ needs.deploy.result }}
|
||||
**Repo:** ${{ github.repository }}
|
||||
**Commit:** ${{ github.sha }}
|
||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
# uses: https://github.com/appleboy/discord-action@master
|
||||
# with:
|
||||
# color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
|
||||
# message: |
|
||||
# **Deployment Report**
|
||||
# **Status:** ${{ needs.deploy.result }}
|
||||
# **Repo:** ${{ github.repository }}
|
||||
# **Commit:** ${{ github.sha }}
|
||||
# webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||
# webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
||||
|
||||
# Trial with curl as the above just fails
|
||||
run: |
|
||||
STATUS="${{ needs.deploy.result }}"
|
||||
COLOR=$([ "$STATUS" == "success" ] && echo "48867" || echo "16711680")
|
||||
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "Deployment Report",
|
||||
"color": '$COLOR',
|
||||
"description": "Status: **'$STATUS'**\nRepo: ${{ github.repository }}\nCommit: ${{ github.sha }}"
|
||||
}]
|
||||
}' \
|
||||
"${{ secrets.DISCORD_WEBHOOK_URL }}"
|
||||
|
||||
# For later
|
||||
# - name: Send Matrix Notification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue