slack-release-webhook-test #1
This file contains hidden or 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
| # 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" |