Sync Version Logs #913
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: Sync Version Logs | |
on: | |
schedule: | |
- cron: "59 23 * * *" | |
workflow_dispatch: | |
jobs: | |
sync: | |
name: Sync | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Sync from MCBBS | |
run: python version_sync.py | |
- name: Commit the changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "SPGlove" | |
git add . | |
git diff-index --quiet HEAD || git commit -m ":arrows_counterclockwise: sync version logs" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |