fix: workflow to only read commits from main #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Echos Registry Codegen | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
codegen: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Allows the action to create a pull request | |
pull-requests: write # For creating/updating pull requests | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: v20.17.0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run codegen | |
run: pnpm build:codegen | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "chore: regenerate entry file" | |
title: "Regenerate entry file" | |
body: "Auto-generated PR after changes in src/agents directory" | |
branch: "chore/auto-codegen" | |
base: main | |
delete-branch: true |