Repository navigation
[releases/28.3] Reference repository actions locally and sync them with main - #14052
Maria Zhelezova (mazhelez) wants to merge 6 commits into
Conversation
Replace 'microsoft/BCApps/.github/actions/<X>@main' with local './.github/actions/<X>' references so the action code matches the workflow's commit. Jobs without a checkout get one; jobs that check out another branch (matrix.branch) sparse-check out the workflow's own commit into '_actions' and reference the action from there. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Make the code of all repository actions (.github/actions) identical to main so every in-support branch runs the same action versions. Actions import PowerShell modules from build/scripts, so the dependencies needed by the actions are brought in line with main as well: - Modules only consumed by actions are synced as whole files (AutomatedSubmission, AppObjectValidation, BuildOptimization, TestPreprocessorSymbols, PlatformHelper, their tests, and Miapp where VerifyMiappSync is used). - EnlistmentHelperFunctions.psm1 is shared with the build, so only the functions required by the actions are taken from main (Get-PackageLatestVersion, Get-LatestBCArtifactUrl, Update-BCArtifactVersion, Update-PackageVersion, Test-IsBranchInSupport). Build-facing functions are left unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
PR creation failures can be masked as successful automation, and unexpanded wildcard test-folder paths can cause test objects to be validated against production ID ranges.
2 open issues
What changed in this PR
Backports #14038 to releases/28.3, replacing moving @main action references with local actions and synchronizing action code and selected supporting scripts with main.
Changes:
- Uses local actions after checkout, with a separate sparse checkout for matrix automation code.
- Synchronizes validation, automation, and maintenance actions while leaving build-facing scripts unchanged.
- Adds platform-version helpers and object-validation tests.
| File | Description |
|---|---|
build/scripts/tests/PlatformHelper.Test.ps1 |
Tests platform lookup, caching, and errors. |
build/scripts/tests/AppObjectValidation.Test.ps1 |
Tests ID ranges and test-app exclusions. |
build/scripts/PlatformHelper.psm1 |
Adds platform-version lookup and resolution. |
build/scripts/EnlistmentHelperFunctions.psm1 |
Updates branch-aware package selection and version pinning. |
build/scripts/BuildOptimization.psm1 |
Adds change-detection and dependency-analysis helpers. |
build/scripts/AutomatedSubmission.psm1 |
Makes auto-merge failures nonfatal. |
build/scripts/AppObjectValidation.psm1 |
Extends manifest and production object-ID validation. |
.github/workflows/VerifyAppChanges.yaml |
Runs validation actions locally. |
.github/workflows/UpdatePackageVersions.yaml |
Uses local actions from a separate checkout. |
.github/workflows/UpdateBCArtifactVersion.yaml |
Uses local actions from a separate checkout. |
.github/workflows/UpdateALGoProjects.yaml |
Uses local actions from a separate checkout. |
.github/workflows/SubmitStabilityJobs.yaml |
Adds checkouts and local action references. |
.github/actions/VerifyMiappSync/action.yaml |
Defines the Miapp synchronization action. |
.github/actions/VerifyMiappSync/action.ps1 |
Invokes Miapp synchronization validation. |
.github/actions/ValidateCountryProjects/action.yaml |
Defines the country-project validation action. |
.github/actions/ValidateCountryProjects/action.ps1 |
Invokes country-project settings validation. |
.github/actions/UpdateUnstableTestsCombined/action.yaml |
Configures combined detection and artifact upload. |
.github/actions/UpdateUnstableTestsCombined/action.ps1 |
Invokes the combined unstable-test updater. |
.github/actions/UpdateUnstableTests/action.yaml |
Configures run-based unstable-test updates. |
.github/actions/UpdateUnstableTests/action.ps1 |
Invokes artifact updates for supplied runs. |
.github/actions/TestObsoleteTagPreprocessors/action.yaml |
Defines obsolete-tag preprocessor validation. |
.github/actions/TestObsoleteTagPreprocessors/action.ps1 |
Checks obsolete tags with fixture exceptions. |
.github/actions/TestObjectIdsAndManifests/action.ps1 |
Updates validation scope, exceptions, and added-file checks. |
.github/actions/RunAutomation/UpdateSystemFilesSchedule/run.ps1 |
Restricts scheduled updates to supported branches. |
.github/actions/RunAutomation/UpdatePlatformVersion/run.ps1 |
Adds optional platform-package updates. |
.github/actions/RunAutomation/UpdateAppBaselines/run.ps1 |
Passes the target branch to baseline selection. |
.github/actions/RunAutomation/SubmitStabilityJob/run.ps1 |
Dispatches stability builds by workflow filename. |
.github/actions/RunAutomation/run.ps1 |
Skips unsupported branches and updates work-item linkage. |
.github/actions/RunAutomation/HowToAddAnAutomation.md |
Documents local actions and pinned checkout examples. |
.github/actions/LabelPRsAwaitingApproval/action.yaml |
Defines approval-label synchronization inputs. |
.github/actions/LabelPRsAwaitingApproval/action.ps1 |
Synchronizes labels for runs awaiting approval. |
.github/actions/GetGitBranches/action.yaml |
Pins the checkout action to a commit. |
.github/actions/CleanUpStalePRChecks/action.ps1 |
Handles unknown mergeability and reports skipped PRs. |
Review effort: Balanced
| $parameters = ($params -join " ") | ||
|
|
||
| Write-Host "gh pr create $parameters" | ||
| $prLink = Invoke-Expression "gh pr create $parameters" |
Workflows that only run on schedule/workflow_dispatch execute from main, so the copies of their actions and build scripts are not needed here. Keep only the actions used by workflows that run on this branch (identical to main) and revert the rest to the base branch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
commented
Nov 22, 2026
|
'Layers' exists on release branches from 29.0 onwards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Release branches use testFolders such as 'src/Apps/W1/*/Test'. Expand these to the matching folders so added files in those test apps are excluded from the object ID range check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


What & why
Backport of #14038 to
releases/28.3. Action references must be pinned to a fixed SHA, andmicrosoft/BCApps/.github/actions/<Action>@mainis not. These references also ranmain's action code on this branch.SubmitStabilityJobs,UpdateALGoProjects,UpdateBCArtifactVersion,UpdatePackageVersions,VerifyAppChangesnow use./.github/actions/<Action>.main.VerifyAppChangesrunsTestObjectIdsAndManifests,TestPreprocessorSymbolson this branch. Local actions use this branch'sbuild/scripts, so these were updated tomain's version:.github/actions/TestObjectIdsAndManifestsbuild/scripts/AppObjectValidation.psm1build/scripts/BuildOptimization.psm1build/scripts/tests/AppObjectValidation.Test.ps1SubmitStabilityJobs,UpdateALGoProjects,UpdateBCArtifactVersion,UpdatePackageVersionsonly run onschedule/workflow_dispatch, so in practice they run frommain(scheduled runs only fire on the default branch). Their references are localized here for consistency, but the actions they use (RunAutomation,GetGitBranches, ...) are left at this branch's version and are not synced.Linked work
AB#656028
Relates to #14038.
How I validated this
What I tested and the outcome
microsoft/BCApps/.github/actions/*@...references remain in workflows; changed workflows parse as YAML; every local action path exists. Passed.TestObjectIdsAndManifests,TestPreprocessorSymbolstrees equalmain's, and every module they import exists on this branch. Passed.build/scripts/tests) on a full export of28.xfrom this set of PRs. Passed.Risk & compatibility
mainmust be backported.