-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1003 Bytes
/
worker_main.yaml
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
name: run main.py
on:
# push:
# branches:
# - main
schedule:
- cron: "*/15 * * * *" # 15분 마다
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install aiohttp
pip install motor
pip install pydantic
pip install pytz
pip install aiohttp-retry
pip install python-dotenv
- name: Execute Python script in the worker directory
env:
pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
DB_URL: ${{ secrets.DB_URL }}
PERIOD_MIN: ${{ secrets.PERIOD_MIN }}
WORKER_ENV: ${{ secrets.WORKER_ENV }}
run: |
cd ./worker
mkdir logs
python main.py