Skip to content

fix: run generate workflow only on main (separates PR testing from write operations)#408

Open
Gen1us1100 wants to merge 1 commit into
SchwarzIT:mainfrom
Gen1us1100:fix/generate-workflow
Open

fix: run generate workflow only on main (separates PR testing from write operations)#408
Gen1us1100 wants to merge 1 commit into
SchwarzIT:mainfrom
Gen1us1100:fix/generate-workflow

Conversation

@Gen1us1100

@Gen1us1100 Gen1us1100 commented Jul 27, 2025

Copy link
Copy Markdown

This changes generate.yml so it only runs when code is pushed to main.

Currently, the workflow could run on PR branches and attempt to push regenerated files, which is blocked for Dependabot and other read‑only PRs.

By limiting it to push on main, we:

-- keep PR workflows read‑only (only build and test),
-- avoid bots committing back to PR branches, and
-- still ensure generated files are updated on main after merges.

This separates testing from write operations and aligns the workflow with GitHub best practices.

@Gen1us1100 Gen1us1100 requested a review from a team as a code owner July 27, 2025 13:12
@Gen1us1100

Gen1us1100 commented Jul 27, 2025

Copy link
Copy Markdown
Author

I’m new to GitHub workflows and opened this PR after researching how Dependabot and PR workflows interact. My goal is to move the write steps in generate.yml so they only run on main, which seems to be the safer and cleaner approach.
If there’s a better way to handle this, I’m happy to adjust or close the PR. I’m mostly looking to learn and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant