Send Email Reminders #356
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: Send Email Reminders | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| call-api: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Log current time | |
| run: date -u | |
| - name: Call lesson-plan reminders | |
| run: | | |
| curl -s -X GET "${{ secrets.NEXT_PUBLIC_PROD_URL }}/api/emails/reminders/lessonPlans" \ | |
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" | |
| - name: Call fill summaries | |
| run: | | |
| curl -s -X GET "${{ secrets.NEXT_PUBLIC_PROD_URL }}/api/emails/reminders/fillSummaries" \ | |
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" | |
| - name: Call upcoming filled class reminders | |
| run: | | |
| curl -s -X GET "${{ secrets.NEXT_PUBLIC_PROD_URL }}/api/emails/reminders/upcomingFilled" \ | |
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" | |
| - name: Call unfilled absence opportunities | |
| run: | | |
| curl -s -X GET "${{ secrets.NEXT_PUBLIC_PROD_URL }}/api/emails/reminders/unfilledAbsences" \ | |
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" | |
| - name: Call daily declaration digests | |
| run: | | |
| curl -s -X GET "${{ secrets.NEXT_PUBLIC_PROD_URL }}/api/emails/reminders/dailyDigest" \ | |
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" |