Skip to content

slack-release-webhook-test #1

slack-release-webhook-test

slack-release-webhook-test #1

# TEMPORARY — one-shot test of the PYAUTO_RELEASE_WEBHOOK_URL secret
# (#pipreleases). Deleted once the test message is confirmed.
name: slack-release-webhook-test
on:
workflow_dispatch: {}
jobs:
test-post:
runs-on: ubuntu-latest
steps:
- name: POST test message to release webhook
env:
SLACK_WEBHOOK_URL: ${{ secrets.PYAUTO_RELEASE_WEBHOOK_URL }}
run: |
if [ -z "$SLACK_WEBHOOK_URL" ]; then
echo "::error::PYAUTO_RELEASE_WEBHOOK_URL secret is not set"
exit 1
fi
curl -sS -X POST \
-H "Content-Type: application/json" \
--fail-with-body \
--data '{"text": ":test_tube: Test message — PyAuto release announcements will appear in this channel. (One-off webhook test; safe to ignore.)"}' \
"$SLACK_WEBHOOK_URL"