-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (41 loc) · 1.23 KB
/
update.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
42
43
44
45
46
47
name: update-companies
on:
schedule:
# 하루에 한 번, 04:00 UTC => 13:00 (GMT+9)에 업데이트
- cron: '0 4 * * *'
push:
branches:
- main
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (`aiohttp`)
run: |
python -m pip install --upgrade pip
pip install aiohttp
- name: Run script
run: |
python3 ./src/update-json.py ${{ secrets.GITHUB_TOKEN }}
python3 ./src/update-markdown.py
- name: Set date in environment variable
run: echo "DATE=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: Commit & Push changes
uses: Andro999b/push@patch-1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
message: >
🎉 기업별 GitHub 데이터 업데이트 완료 (${{ env.DATE }})