Merge pull request 'Update .gitea/workflows/docker-build.yml' (#2) from cal-patch-2 into main
All checks were successful
/ build (push) Successful in 34s
All checks were successful
/ build (push) Successful in 34s
Reviewed-on: #2
This commit is contained in:
commit
c252ab3f1a
@ -72,3 +72,86 @@ jobs:
|
|||||||
Author: ${{ github.actor }}
|
Author: ${{ github.actor }}
|
||||||
Timestamp: ${{ steps.meta.outputs.timestamp }}
|
Timestamp: ${{ steps.meta.outputs.timestamp }}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
- name: Discord Notification - Success
|
||||||
|
if: success() && github.ref == 'refs/heads/main'
|
||||||
|
run: |
|
||||||
|
curl -H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"embeds": [{
|
||||||
|
"title": "✅ Paper Dynasty Build Successful",
|
||||||
|
"description": "Docker image built and ready to deploy!",
|
||||||
|
"color": 3066993,
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "Version",
|
||||||
|
"value": "`v${{ steps.meta.outputs.version }}`",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Image Tag",
|
||||||
|
"value": "`${{ steps.meta.outputs.version_sha }}`",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Branch",
|
||||||
|
"value": "`${{ steps.meta.outputs.branch }}`",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Commit",
|
||||||
|
"value": "`${{ steps.meta.outputs.sha_short }}`",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Author",
|
||||||
|
"value": "${{ github.actor }}",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "View Run",
|
||||||
|
"value": "[Click here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
|
||||||
|
"inline": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": "${{ steps.meta.outputs.timestamp }}"
|
||||||
|
}]
|
||||||
|
}' \
|
||||||
|
https://discord.com/api/webhooks/1468485116631453840/JALtLV8dO2IWso3tNcntHW8wDgQeMZuLgFKVUeoEY9ig_OPjjm4PmjvzwYebH5l7_Nxv
|
||||||
|
|
||||||
|
- name: Discord Notification - Failure
|
||||||
|
if: failure() && github.ref == 'refs/heads/main'
|
||||||
|
run: |
|
||||||
|
curl -H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"embeds": [{
|
||||||
|
"title": "❌ Paper Dynasty Build Failed",
|
||||||
|
"description": "Docker build encountered an error.",
|
||||||
|
"color": 15158332,
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "Branch",
|
||||||
|
"value": "`${{ github.ref_name }}`",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Commit",
|
||||||
|
"value": "`${{ github.sha }}`",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Author",
|
||||||
|
"value": "${{ github.actor }}",
|
||||||
|
"inline": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "View Logs",
|
||||||
|
"value": "[Click here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
|
||||||
|
"inline": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
|
||||||
|
}]
|
||||||
|
}' \
|
||||||
|
https://discord.com/api/webhooks/1468485116631453840/JALtLV8dO2IWso3tNcntHW8wDgQeMZuLgFKVUeoEY9ig_OPjjm4PmjvzwYebH5l7_Nxv
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user