Skip to content

Update generate_types.yml #4

Update generate_types.yml

Update generate_types.yml #4

name: Generate Types
on:
push:
branches:
- "**" # Runs on all branches for any push
jobs:
generate-types:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code
- name: Checkout code
uses: actions/[email protected]
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
# Step 3: Pull the JSON repo
- name: Pull the JSON repo
run: |
git submodule update --init
# Step 4: Run the generate_types script
- name: Run generate_types.py
run: |
python generate_types.py
# Step 5: Commit changes (if any generated file is updated)
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add helldivepy/generated_types.py
git commit -m "Automated update: Regenerated types" || echo "No changes to commit"
git push