Remindly Daily Push #16
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: Remindly Daily Push | |
| on: | |
| schedule: | |
| # Runs daily at 07:00 Asia/Kolkata (01:30 UTC) | |
| - cron: "30 1 * * *" | |
| - cron: "30 6 * * *" # 12:00 IST | |
| - cron: "30 12 * * *" # 18:00 IST | |
| - cron: "30 14 * * *" # 20:00 IST | |
| - cron: "30 16 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| run-remindly: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Write OAuth credentials (client_secret.json) | |
| env: | |
| CLIENT_SECRET_JSON: ${{ secrets.CLIENT_SECRET_JSON }} | |
| run: | | |
| echo "$CLIENT_SECRET_JSON" > client_secret.json | |
| - name: Write Gmail/Calendar token (token.json) | |
| env: | |
| GMAIL_TOKEN_JSON: ${{ secrets.GMAIL_TOKEN_JSON }} | |
| run: | | |
| echo "$GMAIL_TOKEN_JSON" > token.json | |
| - name: Write .env for LMS/email creds | |
| env: | |
| LMS_USERNAME: ${{ secrets.LMS_USERNAME }} | |
| LMS_PASSWORD: ${{ secrets.LMS_PASSWORD }} | |
| SENDER_EMAIL: ${{ secrets.SENDER_EMAIL }} | |
| APP_PASSWORD: ${{ secrets.APP_PASSWORD }} | |
| RECEIVER_EMAIL: ${{ secrets.RECEIVER_EMAIL }} | |
| run: | | |
| { | |
| echo "LMS_USERNAME=$LMS_USERNAME"; | |
| echo "LMS_PASSWORD=$LMS_PASSWORD"; | |
| echo "SENDER_EMAIL=$SENDER_EMAIL"; | |
| echo "APP_PASSWORD=$APP_PASSWORD"; | |
| echo "RECEIVER_EMAIL=$RECEIVER_EMAIL"; | |
| } > .env | |
| - name: Run daily push | |
| run: | | |
| python push_deadlines.py | |
| python send_reminders.py | |