Skip to content

Update data daily

Update data daily #751

name: Update data daily
on:
schedule:
# KOR - 9H = UTC
# Seoul 09:30 월-금 -> UTC 00:30
- cron: "30 0 * * *"
workflow_dispatch:
inputs:
tags:
description: 'Activate Manually'
required: true
type: boolean
repository_dispatch:
types: [update-data] # 예시: 'deploy-command'라는 타입의 이벤트가 오면 실행
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: install system dependency
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxslt-dev -y
- uses: actions/setup-python@v5
with:
python-version: 3.8
# https://github.com/marketplace/actions/python-poetry-action
- name: Install poetry
uses: abatilo/actions-poetry@v4
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
# - name: poetry update
# run: poetry update
- name: Get Company List
run: |
bash run_get_data_origin.sh
- name: Get Etc Data 01
run: |
poetry run python run_get_nv_data_daily.py
- name: Get Etc Data 02
run: |
poetry run python run_get_yh_data_daily.py
- name: Build Misc Data
run: |
poetry run python run_build_misc.py
- name: Get Data From ECOS
env:
ECOS_KEY: ${{ secrets.ECOS_KEY }}
run: |
poetry run python run_get_ecos_data_daily.py
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
message: get new data & update