Skip to content

Update csv

Update csv #425

Workflow file for this run

name: Update
on:
push:
paths:
- 'HK.csv'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install pypinyin
- name: Run main.py script
run: |
ls
python main.py
ls
- name: Update README.md with current date
run: |
date_str=$(date +'%Y/%m/%d')
sed -i "s#^数据更新时间:.*#数据更新时间: ${date_str}#" README.md
- name: Configure Git
run: |
git config --global user.name "update"
git config --global user.email "tg@spiritlhl.top"
- name: Add files to Git staging area
run: |
ls
pwd
git add .
- name: Check Git status
run: |
git branch -a
git remote -v
git status
- name: Commit changes
run: |
(
git commit -m "Update CSV files"
) || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}