Fix Rerun Unstable Failures workflow: bind job to Official-Build environment#7857
Merged
aholstrup1 merged 1 commit intomainfrom Apr 27, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/microsoft/BCApps/sessions/3aac1b0e-102b-4b7b-97ea-338a8da0d173 Co-authored-by: mazhelez <[email protected]>
Copilot created this pull request from a session on behalf of
mazhelez
April 27, 2026 11:04
View session
aholstrup1
approved these changes
Apr 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the Rerun Unstable Failures GitHub Actions workflow by ensuring it runs in the Official-Build environment so the GitHub App credentials resolve correctly and the workflow can mint a usable GH_TOKEN for rerun operations.
Changes:
- Bind the
RerunUnstableFailuresjob toenvironment: Official-Buildsosecrets.PRIVATE_KEYis available. - Remove the now-redundant guard/soft-failure behavior around GitHub App token creation.
- Remove the PAT fallback and rely exclusively on the GitHub App token output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mazhelez
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new
Rerun Unstable Failuresworkflow (failed run) errored with[@octokit/auth-app] privateKey option is required, thenFailed to fetch runbecauseGH_TOKENwas empty.secrets.PRIVATE_KEYis scoped to theOfficial-Buildenvironment in this repo — every other workflow consuming it (SubmitStabilityJobs,UpdateBCArtifactVersion,UpdateALGoProjects,UpdatePackageVersions,UpdateGitHubGoSystemFiles) declares that environment on the job. This one did not, so the secret expanded to empty, the app-token action failed, and thesecrets.RERUNPATfallback was empty too.Changes to
.github/workflows/RerunUnstableFailures.yamlenvironment: Official-Buildto theRerunUnstableFailuresjob sosecrets.PRIVATE_KEYresolves.if: vars.APP_ID != '',continue-on-error: true, and|| secrets.RERUNPATfallback so the wiring matches the other Official-Build workflows.Fixes AB#632025