-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.34 KB
/
run-recurring-tasks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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