File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -386,3 +386,18 @@ jobs:
386386 else
387387 echo "⚠️ ROLLBAR_ACCESS_TOKEN not configured, skipping deployment notification"
388388 fi
389+
390+ - name : Notify Rollbar of deployment failure
391+ if : failure()
392+ run : |
393+ # Notify Rollbar of failed deployment (if token is configured)
394+ if [ -n "${{ secrets.ROLLBAR_ACCESS_TOKEN }}" ]; then
395+ curl -X POST 'https://api.rollbar.com/api/1/deploy/' \
396+ -F access_token="${{ secrets.ROLLBAR_ACCESS_TOKEN }}" \
397+ -F environment="production" \
398+ -F revision="${{ github.sha }}" \
399+ -F local_username="${{ github.actor }}" \
400+ -F comment="FAILED: CodeDeploy deployment from ${{ github.ref_name }}" \
401+ -F status=failed
402+ echo "📊 Rollbar failure notification sent"
403+ fi
Original file line number Diff line number Diff line change @@ -386,3 +386,18 @@ jobs:
386386 else
387387 echo "⚠️ ROLLBAR_ACCESS_TOKEN not configured, skipping deployment notification"
388388 fi
389+
390+ - name : Notify Rollbar of deployment failure
391+ if : failure()
392+ run : |
393+ # Notify Rollbar of failed deployment (if token is configured)
394+ if [ -n "${{ secrets.ROLLBAR_ACCESS_TOKEN }}" ]; then
395+ curl -X POST 'https://api.rollbar.com/api/1/deploy/' \
396+ -F access_token="${{ secrets.ROLLBAR_ACCESS_TOKEN }}" \
397+ -F environment="staging" \
398+ -F revision="${{ github.sha }}" \
399+ -F local_username="${{ github.actor }}" \
400+ -F comment="FAILED: CodeDeploy deployment from ${{ github.ref_name }}" \
401+ -F status=failed
402+ echo "📊 Rollbar failure notification sent"
403+ fi
You can’t perform that action at this time.
0 commit comments