This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
UpdateCSVFiles #6985
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: UpdateCSVFiles | |
on: | |
schedule: | |
- cron: '40 0,3,6,9,12,15,18,21 * * *' # UTC | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Update csv files | |
run: | | |
python update.py | |
- name: git setting | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
- name: Commit files | |
run: | | |
if [[ `git diff --exit-code --quiet; echo $?` -eq 1 ]]; then | |
git add . | |
git commit -m "Update csv files" -a | |
git pull | |
git push origin main | |
else | |
echo "Not update any csv files" | |
fi | |
exit 0 |