Skip to content

generate_calendar

generate_calendar #100

Workflow file for this run

name: generate_calendar
on:
# push:
# branches:
# - main
schedule:
- cron: "0 */12 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Generate calendar files
env:
SEASON: ${{ vars.SEASON }}
LEAGUE: ${{ vars.LEAGUE }}
OUTPUT_ROOT: ${{ github.workspace }}
run: |-
cd $GITHUB_WORKSPACE
python -m src.main
- name: Commit calendar files if changed
run: |-
git diff
git config --global user.email "actions@users.noreply.github.com"
git config --global user.name "JEFF-bot"
git add -A
git commit -m "Updated calendars" || exit 0
git push