-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Guard release workflow jobs from upstream failures #2146
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
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 |
|---|---|---|
|
|
@@ -171,6 +171,7 @@ jobs: | |
| build: | ||
| name: Build ${{ matrix.label }} | ||
| needs: preflight | ||
| if: ${{ !failure() && !cancelled() }} | ||
|
Contributor
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. Guards allow jobs to run when preflight is skippedHigh Severity The Additional Locations (2)Reviewed by Cursor Bugbot for commit 510350a. Configure here.
Contributor
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. Bugbot Autofix determined this is a false positive. All three jobs (build, publish_cli, release) already include You can send follow-ups to the cloud agent here. |
||
| runs-on: ${{ matrix.runner }} | ||
| timeout-minutes: 30 | ||
| strategy: | ||
|
|
@@ -353,6 +354,7 @@ jobs: | |
| publish_cli: | ||
| name: Publish CLI to npm | ||
| needs: [preflight, build] | ||
| if: ${{ !failure() && !cancelled() }} | ||
| runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404 | ||
| timeout-minutes: 10 | ||
| steps: | ||
|
|
@@ -387,6 +389,7 @@ jobs: | |
| release: | ||
| name: Publish GitHub Release | ||
| needs: [preflight, build, publish_cli] | ||
| if: ${{ !failure() && !cancelled() }} | ||
| runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404 | ||
| timeout-minutes: 10 | ||
| steps: | ||
|
|
@@ -496,7 +499,7 @@ jobs: | |
|
|
||
| finalize: | ||
| name: Finalize release | ||
| if: needs.preflight.outputs.release_channel == 'stable' | ||
| if: ${{ !failure() && !cancelled() && needs.preflight.outputs.release_channel == 'stable' }} | ||
| needs: [preflight, release] | ||
| runs-on: blacksmith-8vcpu-ubuntu-2404 | ||
| timeout-minutes: 10 | ||
|
|
||


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.
🔴 Critical
workflows/release.yml:174The
if: ${{ !failure() && !cancelled() }}condition onbuild,publish_cli, andreleaseallows these jobs to run whenpreflightis skipped — which happens on scheduled runs with no changes. Whenpreflightis skipped, its outputs are empty, sobuildruns with emptyversionandrefvalues, cascading to broken releases. GitHub Actions' defaultsuccess()would prevent this, but!failure() && !cancelled()is weaker and permits skipped upstream jobs. Consider adding&& needs.preflight.result == 'success'to each job'sifcondition.🚀 Reply "fix it for me" or copy this AI Prompt for your agent: