Skip to content

Refresh Data

Refresh Data #5272

Workflow file for this run

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.11'
- 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