-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (37 loc) · 1.04 KB
/
generate_model.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
45
46
name: Generate Model and Commit
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
push:
branches:
- main
jobs:
generate_model:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install .[generate_models]
- name: Set up Chrome and ChromeDriver
uses: browser-actions/setup-chrome@v1.7.2
with:
install-chromedriver: true
- name: Run generate_models.py
run: |
python duck_chat/models/generate_models.py
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Auto-generated model_type.py"
file_pattern: "duck_chat/models/model_type.py"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}