-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 997 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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