-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (40 loc) · 1.1 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
47
48
49
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
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v5
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
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Auto-generated model_type.py
title: Update Models
branch: update-models
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}