From 9332086ee9e7ee7a40879a8eedff351c2c62901f Mon Sep 17 00:00:00 2001 From: kittapath Date: Sun, 12 Oct 2025 16:13:04 +0700 Subject: [PATCH] open noti --- .github/workflows/release.yaml | 72 +++++++++++++++++----------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1de509f..f2b3ab2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -67,40 +67,40 @@ jobs: docker compose pull docker compose up -d echo "${{ steps.gen_ver.outputs.image_ver }}"> success - # - name: Notify Discord Success - # if: success() - # run: | - # curl -H "Content-Type: application/json" \ - # -X POST \ - # -d '{ - # "embeds": [{ - # "title": "✅ Deployment Success!", - # "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", - # "color": 3066993, - # "footer": { - # "text": "Release Notification", - # "icon_url": "https://example.com/success-icon.png" - # }, - # "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - # }] - # }' \ - # ${{ secrets.DISCORD_WEBHOOK }} + - name: Notify Discord Success + if: success() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "✅ Deployment Success!", + "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`", + "color": 3066993, + "footer": { + "text": "Release Notification", + "icon_url": "https://example.com/success-icon.png" + }, + "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" + }] + }' \ + ${{ secrets.DISCORD_WEBHOOK }} - # - name: Notify Discord Failure - # if: failure() - # run: | - # curl -H "Content-Type: application/json" \ - # -X POST \ - # -d '{ - # "embeds": [{ - # "title": "❌ Deployment Failed!", - # "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", - # "color": 15158332, - # "footer": { - # "text": "Release Notification", - # "icon_url": "https://example.com/failure-icon.png" - # }, - # "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - # }] - # }' \ - # ${{ secrets.DISCORD_WEBHOOK }} + - name: Notify Discord Failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "❌ Deployment Failed!", + "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`", + "color": 15158332, + "footer": { + "text": "Release Notification", + "icon_url": "https://example.com/failure-icon.png" + }, + "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'" + }] + }' \ + ${{ secrets.DISCORD_WEBHOOK }}