Birthday Discord Bot #56
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
| name: Birthday Discord Bot | |
| on: | |
| schedule: | |
| # Always runs after midnight Melbourne time (AEST/AEDT): | |
| # - 14:00 UTC = 00:00 (midnight) in AEST (winter) | |
| # - 14:00 UTC = 01:00 in AEDT (summer) | |
| # This ensures the workflow never runs before midnight in Melbourne, regardless of daylight savings. | |
| - cron: '0 14 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| run-birthday-bot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run birthday bot | |
| env: | |
| NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
| DATABASE_ID: ${{ secrets.DATABASE_ID }} | |
| WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} | |
| HR_DISCORD_ID: ${{ secrets.HR_DISCORD_ID }} | |
| run: python main.py |