run token_refresh.py #278
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 token_refresh.py | |
on: | |
# push: | |
# branches: | |
# - main | |
schedule: | |
- cron: "*/40 * * * *" # 40분 마다 | |
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 token_refresh.py |