Skip to content

Generate Model and Commit #50

Generate Model and Commit

Generate Model and Commit #50

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/[email protected]
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 }}