Only build on pushes to main #5

Merged
moof merged 0 commits from refs/pull/5/head into main 2026-10-21 01:00:33 +00:00
moof commented 2026-10-21 00:29:03 +00:00 (Migrated from code.moof.space)

Requested by Moof · project thread

A build takes 20 to 30 minutes, and there is only one runner. Every branch push was building even though only main deploys, so those builds held up main's deploys. Meanwhile, each newer push to main cancelled the run before it, so tonight no deploy finished.

With this change, the workflow runs only on pushes to main, on workflow_dispatch and on workflow_call. A branch can still be built by hand with "Run workflow". The if on the deploy job stays, so a manual run on a branch builds without deploying.

Forgejo reads the workflow from the pushed commit, so pushing this branch shouldn't start a build of its own.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bwekd9qi3u7oYcMtUGthAK

<!-- claude-projects-attribution --> _Requested by **Moof** · [project thread](https://claude.ai/code/project/chan_01BmPQxcG1UuS21Gfai9Zcdh?thread=cmsg_01BmPQxcG1UuS21Gfai9Zcdh9K5YNRLuLz6yZT4aVDVjYr)_ A build takes 20 to 30 minutes, and there is only one runner. Every branch push was building even though only main deploys, so those builds held up main's deploys. Meanwhile, each newer push to main cancelled the run before it, so tonight no deploy finished. With this change, the workflow runs only on pushes to `main`, on `workflow_dispatch` and on `workflow_call`. A branch can still be built by hand with "Run workflow". The `if` on the deploy job stays, so a manual run on a branch builds without deploying. Forgejo reads the workflow from the pushed commit, so pushing this branch shouldn't start a build of its own. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Bwekd9qi3u7oYcMtUGthAK
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Reference4PT/reference4pt.eu!5
No description provided.