From c3def212208bf4140016ad2df6ab73828380f97d Mon Sep 17 00:00:00 2001 From: Joshua King Date: Sun, 26 Apr 2026 12:52:22 -0400 Subject: [PATCH] add notifications for Slack on success and failure of dev deployment --- .gitea/workflows/dev.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 393cce2..65ad3d7 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -47,4 +47,26 @@ jobs: chmod 600 /tmp/dev_key ssh -i /tmp/dev_key -o StrictHostKeyChecking=no \ ${{ secrets.DEV_DEPLOY_USER }}@${{ secrets.DEV_DEPLOY_HOST }} \ - "${{ secrets.DEV_DEPLOY_PATH }}/deploy.sh" \ No newline at end of file + "${{ secrets.DEV_DEPLOY_PATH }}/deploy.sh" + + notify-success: + needs: [build-test, deploy-dev] + if: success() && gitea.event_name == 'push' + runs-on: ubuntu-latest + steps: + - name: Notify Slack success + run: | + curl -X POST -H 'Content-type: application/json' \ + --data "{\"text\":\"✅ Extrudex dev deployed successfully from dev branch.\"}" \ + "${{ secrets.SLACK_WEBHOOK_URL }}" + + notify-failure: + needs: [build-test, deploy-dev] + if: failure() + runs-on: ubuntu-latest + steps: + - name: Notify Slack failure + run: | + curl -X POST -H 'Content-type: application/json' \ + --data "{\"text\":\"🚨 Extrudex dev pipeline failed. Check Gitea Actions for details.\"}" \ + "${{ secrets.SLACK_WEBHOOK_URL }}" \ No newline at end of file