testing stripe prod and test webhooks #2303
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: testing stripe prod and test webhooks | |
on: | |
schedule: | |
- cron: "0 9 * * *" # 9am | |
- cron: "0 19 * * *" # 7pm | |
workflow_dispatch: | |
jobs: | |
testing-stripe-prod-and-test-webhooks: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
environment: production | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v1 | |
- name: testing stripe production webhooks | |
run: | | |
set -e | |
curl -v -H 'Content-Type: application/json' ${{ secrets.PROD_ANNOUNCER }} -d '{"stripe_connect_account_id":0, "site_url": "example.com"}' | grep 'example.com' | |
if [ $? == '0' ] | |
then | |
echo "production stripe webhook is working" | |
else | |
echo "production stripe webhook not working" | |
exit 1 | |
fi | |
- name: testing stripe test webhooks | |
run: | | |
set -e | |
curl -v -H 'Content-Type: application/json' ${{ secrets.TEST_ANNOUNCER }} -d '{"stripe_connect_account_id":0, "site_url": "example.com"}' | grep 'example.com' | |
if [ $? == '0' ] | |
then | |
echo "testing stripe webhook is working" | |
else | |
echo "testing stripe webhook not working" | |
exit 1 | |
fi | |