-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.08 KB
/
update_mini.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
39
40
41
42
43
44
name: Update Solutions (The Mini)
on:
schedule:
- cron: '0 3 * * 1-6' # Triggers at 10 p.m. EST the previous day (3 a.m. UTC)
- cron: '0 23 * * 6' # Triggers at 6 p.m. EST on Saturday (11 p.m. UTC)
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update Solutions
run: python update_solutions.py mini
- name: Commit and push if it changed
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add ./solutions/mini_solutions.json
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update solutions"
git push
fi