From 175a19b372d33e03f7ca3a45d3a66149eecb25c5 Mon Sep 17 00:00:00 2001 From: cal Date: Wed, 4 Feb 2026 06:01:01 +0000 Subject: [PATCH] Update .gitea/workflows/docker-build.yml --- .gitea/workflows/docker-build.yml | 83 +++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index afa21f6..aab13d9 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -72,3 +72,86 @@ jobs: Author: ${{ github.actor }} Timestamp: ${{ steps.meta.outputs.timestamp }} 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 +