Refresh Data #3429
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: Refresh Data | |
on: | |
push: | |
schedule: | |
- cron: '04 */6 * * *' | |
jobs: | |
refresh-data: | |
name: Refresh ESB Lights data | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 # https://github.com/marketplace/actions/checkout | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v2 # https://github.com/marketplace/actions/setup-python | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r requirements.txt | |
- name: Refresh ESB lights data | |
run: | |
python3 esb-lights-calendar.py | |
- name: Commit & Push | |
run: | | |
git config --local user.name github-actions | |
git config --local user.email github-actions@users.noreply.github.com | |
git add --all | |
git diff-index --quiet HEAD || git commit -a -m "Update ESB Lights data" | |
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git |