Skip to content

Update

Update #22

Workflow file for this run

name: Update Database
on:
push:
branches:
- action
schedule:
- cron: "15 6 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
path: main
- uses: actions/checkout@v4
with:
ref: data
path: data
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Run
run: |
cd data
pip3 install requests
python3 ../main/conver.py
- name: Check for modified files
id: git-check
run: |
cd data
if [ -n "$(git status --porcelain)" ];then echo "modified=true" >> $GITHUB_OUTPUT;fi
- name: Update
if: steps.git-check.outputs.modified == 'true'
run: |
cd main
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -am "`date +"%Y-%m-%d"`"
git push