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
|
needs: build
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
strategy:
|
strategy:
|
||||||
include: *site_matrix
|
matrix:
|
||||||
|
include: *site_matrix
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
|
|
@ -105,16 +106,32 @@ jobs:
|
||||||
if: always() # Always run
|
if: always() # Always run
|
||||||
steps:
|
steps:
|
||||||
- name: Send Discord Notification
|
- name: Send Discord Notification
|
||||||
uses: https://github.com/appleboy/discord-action@master
|
# uses: https://github.com/appleboy/discord-action@master
|
||||||
with:
|
# with:
|
||||||
color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
|
# color: ${{ needs.deploy.result == 'success' && '48867' || '16711680' }}
|
||||||
message: |
|
# message: |
|
||||||
**Deployment Report**
|
# **Deployment Report**
|
||||||
**Status:** ${{ needs.deploy.result }}
|
# **Status:** ${{ needs.deploy.result }}
|
||||||
**Repo:** ${{ github.repository }}
|
# **Repo:** ${{ github.repository }}
|
||||||
**Commit:** ${{ github.sha }}
|
# **Commit:** ${{ github.sha }}
|
||||||
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
# webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
|
||||||
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
|
# 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
|
# For later
|
||||||
# - name: Send Matrix Notification
|
# - name: Send Matrix Notification
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue