This GitHub Actions automation checks if the Los Angeles Dodgers won a home game yesterday, which means the Panda Express DODGERSWIN coupon is likely active today. If so, it sends an alert to a Discord channel via webhook.
- Checks the MLB Stats API daily at 6 AM PT
- Sends a Discord alert only if the Dodgers won a home game
- Uses a simple Discord Webhook (no bot token or hosting required)
- Includes a debug mode for local testing
- Runs entirely via GitHub Actions (no server or manual cron setup needed)
- The script (
checker.py) queries the MLB Stats API for the Dodgers’ game from the previous day. - If the Dodgers:
- Played at home, and
- Won the game
- A message is posted to your configured Discord webhook stating the coupon is likely active.
- Open your Discord server and navigate to the desired channel.
- Go to Settings → Integrations → Webhooks → New Webhook.
- Name the webhook (e.g., "Dodgers Coupon Bot") and copy the Webhook URL.
- In your GitHub repository, go to: Settings → Secrets and variables → Actions.
- Click “New repository secret”.
- Set the name to
DISCORD_WEBHOOK_URL. - Paste in your Discord Webhook URL.
.
├── check_coupon.py
└── .github/
└── workflows/
└── check.yml
The workflow is scheduled to run automatically every day at 6:00 AM Pacific Time:
on:
schedule:
- cron: '0 13 * * *' # 6 AM PT
workflow_dispatch: # Enables manual execution from the GitHub UIYou can also manually run the workflow from the GitHub Actions tab.
In check_coupon.py, set:
DEBUG = 1This will:
- Print internal information to the console
- Always send a message to the webhook, regardless of outcome
- Use a hardcoded webhook instead of reading from secrets
Set DEBUG = 0 to disable verbose output and restrict alerts to only valid coupon conditions.
Only one external Python dependency is required:
pip install requestsIf conditions are met:
Dodgers won at home on 2025-07-13. Coupon likely active today.