run-recurring-tasks #2374
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: run-recurring-tasks | |
on: | |
workflow_dispatch: | |
schedule: | |
# - cron: "0 0 * * *" # runs at 00:00 UTC (8pm EST) everyday | |
# - cron: "0 10 * * *" # runs at 12:00 UTC (5/6am EST) everyday | |
- cron: "0 3 * * *" # runs at 03:00 UTC (8pm PST) everyday | |
- cron: "0 12 * * *" # runs at 12:00 UTC (5/6am PST) everyday | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11.0" | |
- name: Install pipenv | |
run: | | |
pip install pipenv | |
- name: Install python packages | |
run: pipenv install | |
- name: Execute Python script | |
env: | |
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
NOTION_TASKS_DB_ID: ${{ secrets.NOTION_TASKS_DB_ID }} | |
NOTION_EXECUTIONS_DB_ID: ${{ secrets.NOTION_EXECUTIONS_DB_ID }} | |
NOTION_TIMEZONES_DB_ID: ${{ secrets.NOTION_TIMEZONES_DB_ID }} | |
run: pipenv run python cli.py | |
# - name: commit files | |
# run: | | |
# git config --local user.email "[email protected]" | |
# git config --local user.name "GitHub Action" | |
# git add -A | |
# git commit -m "update execution" -a | |
# git push |