Repository navigation
don't trigger build on push non-master branch - #938
Conversation
WalkthroughAdjusted GitHub Actions workflow triggers in Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant GitHub as GitHub Events
participant CI as build-and-test workflow
rect rgba(200,230,255,0.4)
Dev->>GitHub: push to non-master branch
GitHub-->>CI: no trigger (push limited to master)
end
rect rgba(200,255,200,0.4)
Dev->>GitHub: push to master
GitHub-->>CI: trigger workflow (push)
end
rect rgba(255,245,200,0.4)
Dev->>GitHub: open/update PR
GitHub-->>CI: trigger workflow (pull_request)
end
rect rgba(255,230,230,0.4)
Dev->>GitHub: manual run (workflow_dispatch)
GitHub-->>CI: trigger workflow (workflow_dispatch)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/build-and-test.yaml (1)
5-10: LGTM: limiting push to master will stop duplicate runs from branch pushes. Consider preserving tag builds and adding concurrency.
- If you still want builds on release tags, add a tags filter under push.
- Optional: limit pull_request to the master target and/or specific types to reduce noise.
- Optional: add a top-level concurrency block to auto-cancel superseded runs.
- Please confirm the default branch is indeed "master" in this repo.
Apply within this hunk to keep tag builds:
on: push: branches: - master + tags: + - 'v*' + - 'release-*' pull_request: workflow_dispatch:Add outside this hunk (top level) to cancel redundant runs:
concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: trueOptionally reduce PR-trigger noise:
pull_request: branches: [ master ] types: [ opened, synchronize, reopened, ready_for_review ]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/build-and-test.yaml(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: mainred
PR: robusta-dev/holmesgpt#913
File: .github/workflows/build-and-release.yaml:3-6
Timestamp: 2025-09-04T03:59:20.047Z
Learning: In the holmesgpt repository, the release workflow should trigger on "created" event rather than "published" to align with the previous implementation, as confirmed by mainred.
📚 Learning: 2025-09-04T03:59:20.047Z
Learnt from: mainred
PR: robusta-dev/holmesgpt#913
File: .github/workflows/build-and-release.yaml:3-6
Timestamp: 2025-09-04T03:59:20.047Z
Learning: In the holmesgpt repository, the build-and-release.yaml workflow intentionally triggers on "created" rather than "published" to align with their release process where binary building happens early in the release creation phase, while Docker and PyPI publication workflows trigger on "published".
Applied to files:
.github/workflows/build-and-test.yaml
📚 Learning: 2025-09-04T05:25:00.426Z
Learnt from: mainred
PR: robusta-dev/holmesgpt#913
File: .github/workflows/build-and-release.yaml:96-101
Timestamp: 2025-09-04T05:25:00.426Z
Learning: In the holmesgpt repository's build-and-release.yaml workflow, git commit should not be guarded with a diff check because new releases always require Homebrew formula updates (new URLs and SHA256 hashes), so changes are guaranteed to exist.
Applied to files:
.github/workflows/build-and-test.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: llm_evals
- GitHub Check: Pre-commit checks
|
cc @moshemorad |
Pull requests triggers duplicated builds for both push and pull_request. Limit the push event to master only to not trigger a redundant build.