tiny miss in webhook url #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy and Notify | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send Deployment Webhook | |
id: deploy | |
env: | |
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} | |
run: | | |
PAYLOAD='{}' | |
SIGNATURE=$(echo -n "$PAYLOAD" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | awk '{print $2}') | |
RESPONSE=$(curl -s -X POST \ | |
-H "X-Hub-Signature-256: sha256=$SIGNATURE" \ | |
-H "Content-Type: application/json" \ | |
-d "$PAYLOAD" \ | |
https://webhook.otl.dev.sparcs.org/server-webhook) | |
echo "response=$RESPONSE" >> $GITHUB_ENV | |
- name: Notify Slack | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H 'Content-type: application/json' --data \ | |
'{ | |
"text": "*Deployment Status:*", | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "Deployment Status: *${{ env.response }}*" | |
} | |
} | |
] | |
}' $SLACK_WEBHOOK_URL |