update-companies #500
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@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 }}) |