-
Notifications
You must be signed in to change notification settings - Fork 234
[BED-6524] Build workflow should run on all PRs against main branch #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.X
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,9 @@ | ||||||||||||||||||
| name: Build | ||||||||||||||||||
|
|
||||||||||||||||||
| on: | ||||||||||||||||||
| push: | ||||||||||||||||||
| branches: [ dev ] | ||||||||||||||||||
| pull_request: | ||||||||||||||||||
| branches: [ dev ] | ||||||||||||||||||
| branches: [ 2.X ] | ||||||||||||||||||
| types: [ opened, synchronize ] | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| build: | ||||||||||||||||||
|
|
@@ -24,10 +23,10 @@ jobs: | |||||||||||||||||
| name: Build (${{ matrix.release.type }}) | ||||||||||||||||||
|
|
||||||||||||||||||
| steps: | ||||||||||||||||||
| - uses: actions/checkout@v2 | ||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Setup .NET | ||||||||||||||||||
| uses: actions/setup-dotnet@v1 | ||||||||||||||||||
| uses: actions/setup-dotnet@v4 | ||||||||||||||||||
| with: | ||||||||||||||||||
| dotnet-version: 5.0.x | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
@@ -43,7 +42,7 @@ jobs: | |||||||||||||||||
|
|
||||||||||||||||||
| - name: Update Rolling Release | ||||||||||||||||||
| if: "! startsWith(github.event_name, 'pull_request')" | ||||||||||||||||||
| uses: softprops/action-gh-release@v1 | ||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Release step won’t run; add permissions if re-enabled on push. Given the current PR-only trigger, this step never runs. If you re-enable it on jobs:
build:
+ permissions:
+ contents: writeOptionally, make the condition clearer: - if: "! startsWith(github.event_name, 'pull_request')"
+ if: github.event_name != 'pull_request'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| with: | ||||||||||||||||||
| name: Rolling Release (unstable) | ||||||||||||||||||
| tag_name: rolling | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
🧩 Analysis chain
PR trigger is too narrow; release steps become dead after removing push trigger.
openedandsynchronizeare handled;reopenedandready_for_revieware common PR events you likely want.pushmeans the “Zip” and “Update Rolling Release” steps will never execute (they’re explicitly skipped on PRs), effectively disabling rolling releases in this workflow.Consider re-introducing
push(for 2.X) and broadening PR event types:If the intent is to fully decouple releases, split the release steps into a separate workflow triggered on
pushand remove them from this PR-only workflow.Run this script to verify whether any other workflow currently handles push-based releases; if none, you’re disabling that path:
🏁 Script executed:
Length of output: 826
🏁 Script executed:
Length of output: 598
🏁 Script executed:
Length of output: 197
Reintroduce push trigger and extend PR events in .github/workflows/build.yml
build.yml only runs on
pull_request(opened, synchronize), so the Zip and Rolling Release steps (softprops/action-gh-release) never fire. Update to:Alternatively, move release steps into a separate push-only workflow.
📝 Committable suggestion
🤖 Prompt for AI Agents