Daily map refresh #365
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: Daily map refresh | |
on: | |
schedule: | |
# run everyday a 6am | |
- cron: '0 6 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Refresh map | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
pip install -r requirements.txt | |
python main.py | |
git commit -am "Daily map refresh" || true | |
# ` || true` avoids error code 1 when no updates are made to the repo --> "nothing to commit, working tree clean" | |
git push |