Merge pull request #16 from jongwooo/chore/use-setup-python-action-to… #749
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: 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@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- 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 }}) |