Update #130
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 | |
on: | |
schedule: | |
- cron: '15 8 */7 * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests BeautifulSoup4 | |
- name: Fetching data | |
run: | | |
python cn.py | |
- name: Git Commit | |
env: | |
GitEmail: ${{ secrets.GitEmail }} | |
GitName: ${{ secrets.GitName }} | |
run: | | |
git add -A . | |
git config --local user.email "$GitEmail" | |
git config --local user.name "$GitName" | |
git commit -am "Updated: `date +'%Y-%m-%d %H:%M:%S'` UTC" | |
- name: Git Push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |