-
Notifications
You must be signed in to change notification settings - Fork 94
chore: support manually triggering against a workspace + branch (eg., for when orchestrator-1.9 needs an update); also do the prior version release step if needs.check-merged-pr.outputs.needs_release is true #2467
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: main
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,6 +1,21 @@ | ||
| name: Prior Version Release Workspace | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| workspace: | ||
| description: 'Name of the Workspace' | ||
| required: true | ||
| type: string | ||
| force_release: | ||
| description: 'Force release even if no changesets are present' | ||
| required: false | ||
| type: boolean | ||
| branch: | ||
| description: 'Branch to run the workflow on' | ||
| required: true | ||
| default: '' | ||
| type: string | ||
| # ADDED: Only trigger on PR closed event on workspace/** branch. | ||
| # The assumption is that branch protection rules and CODEOWNERS are configured. | ||
|
|
||
|
|
@@ -109,6 +124,7 @@ jobs: | |
|
|
||
| - name: Check if release | ||
| id: release_check | ||
| if: inputs.force_release != true | ||
| run: | | ||
| yarn install | ||
| node scripts/ci/check-if-release.js | ||
|
|
@@ -120,7 +136,7 @@ jobs: | |
|
|
||
| - name: Update Version Packages (${{ needs.check-merged-pr.outputs.workspace_name }}) PR | ||
| id: changesets-pr | ||
| if: steps.release_check.outputs.needs_release != 'true' | ||
| if: steps.release_check.outputs.needs_release != 'true' || inputs.force_release != true | ||
|
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. 3. Wrong changesets if logic The updated condition for the changesets-action step uses || inputs.force_release != true, which causes the PR-creation step to run when needs_release is 'true' but force_release is false. This defeats the intent of skipping PR creation when version bumps (and thus a release) are already detected. Agent Prompt
|
||
| uses: backstage/changesets-action@a39baf18913e669734ffb00c2fd9900472cfa240 # v2.3.2 | ||
| with: | ||
| title: Version Packages (${{ needs.check-merged-pr.outputs.workspace_name }}) | ||
|
|
@@ -135,7 +151,7 @@ jobs: | |
| name: Prior Version Release workspace ${{ needs.check-merged-pr.outputs.workspace_name }} on branch ${{ github.ref }} | ||
| runs-on: ubuntu-latest | ||
| needs: check-merged-pr | ||
| if: needs.check-merged-pr.outputs.is_version_pr == 'true' | ||
| if: needs.check-merged-pr.outputs.is_version_pr == 'true' || needs.check-merged-pr.outputs.needs_release == 'true' || inputs.force_release == true | ||
|
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. 2. Release checks wrong output The release job condition references needs.check-merged-pr.outputs.needs_release, but check-merged-pr does not output needs_release. This makes the new “run release when needs_release is true” behavior non-functional. Agent Prompt
|
||
| defaults: | ||
| run: | ||
| working-directory: ./workspaces/${{ needs.check-merged-pr.outputs.workspace_name }} | ||
|
|
||
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.
1. Manual dispatch will fail
🐞 Bug⛯ ReliabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools