Auto Update #1404
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: Auto Update | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
auto-update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install pip | |
run: python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Fetch and Generate | |
run: python main.py | |
- name: Commit files | |
run: | | |
git config --local user.name "${{ secrets.GIT_NAME }}" | |
git config --local user.email "${{ secrets.GIT_EMAIL }}" | |
git add . | |
git commit -m "update" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |