check notifications final
All checks were successful
Deploy Portfolio / deploy (push) Successful in 1m35s
All checks were successful
Deploy Portfolio / deploy (push) Successful in 1m35s
This commit is contained in:
@@ -15,7 +15,7 @@ jobs:
|
|||||||
git clone "https://code.chagarlamudi.net/raghu-ch/rc-portfolio.git" .
|
git clone "https://code.chagarlamudi.net/raghu-ch/rc-portfolio.git" .
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t rc-portfolio:latest ./wrong-path
|
run: docker build -t rc-portfolio:latest .
|
||||||
|
|
||||||
- name: Stop old container
|
- name: Stop old container
|
||||||
run: docker stop rc-portfolio || true
|
run: docker stop rc-portfolio || true
|
||||||
@@ -51,22 +51,33 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "mention=<@${{ secrets.DISCORD_ID_RAGHU }}>" >> $GITEA_OUTPUT
|
echo "mention=<@${{ secrets.DISCORD_ID_RAGHU }}>" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
# ✅ Success notification
|
# Success notification
|
||||||
- name: Discord Success Notification
|
- name: Discord Success Notification
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "{
|
-d "{
|
||||||
\"content\": \"✅ **Deployment SUCCESS**\n👤 ${{ steps.discord.outputs.mention }}\n📦 Repo: ${{ gitea.repository }}\n🌿 Branch: ${{ gitea.ref_name }}\"
|
\"content\": \"✅ **Deployment SUCCESS**\n\
|
||||||
|
🧑💻 ${{ steps.discord.outputs.mention }}\n\
|
||||||
|
🗂️ Repo: ${{ gitea.repository }}\n\
|
||||||
|
🌲 Branch: ${{ gitea.ref_name }}\n\
|
||||||
|
🧷 Commit: [${{ steps.commit.outputs.short_sha }}](${{ steps.commit.outputs.url }})\n\
|
||||||
|
✏️ Message: ${{ steps.message.outputs.msg }}\"
|
||||||
}" \
|
}" \
|
||||||
${{ secrets.DISCORD_WEBHOOK_URL }}
|
${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
||||||
# ❌ Failure notification
|
# Failure notification
|
||||||
- name: Discord Failure Notification
|
- name: Discord Failure Notification
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H "Content-Type: application/json" \
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
-d "{
|
-d "{
|
||||||
\"content\": \"❌ **Deployment FAILED**\n👤 ${{ steps.discord.outputs.mention }}\n📦 Repo: ${{ gitea.repository }}\n🌿 Branch: ${{ gitea.ref_name }}\n🔍 Check Gitea Actions logs\"
|
\"content\": \"❌ **Deployment FAILED**\n\
|
||||||
|
🧑💻 ${{ steps.discord.outputs.mention }}\n\
|
||||||
|
🗂️ Repo: ${{ gitea.repository }}\n\
|
||||||
|
🌲 Branch: ${{ gitea.ref_name }}\n\
|
||||||
|
🧷 Commit: [${{ steps.commit.outputs.short_sha }}](${{ steps.commit.outputs.url }})\n\
|
||||||
|
✏️ Message: ${{ steps.message.outputs.msg }}\n\
|
||||||
|
🔍 Check Gitea Actions logs\"
|
||||||
}" \
|
}" \
|
||||||
${{ secrets.DISCORD_WEBHOOK_URL }}
|
${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|||||||
Reference in New Issue
Block a user