Gate PR creation on commit detection in package-update workflow#796
Merged
neilr81 merged 2 commits intobugfix/add-pufrom Feb 7, 2026
Merged
Gate PR creation on commit detection in package-update workflow#796neilr81 merged 2 commits intobugfix/add-pufrom
neilr81 merged 2 commits intobugfix/add-pufrom
Conversation
Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update GitHub Actions workflow for package updates
Gate PR creation on commit detection in package-update workflow
Feb 7, 2026
neilr81
added a commit
that referenced
this pull request
Mar 4, 2026
* Add GitHub Actions workflow for package updates * Add script to update NuGet package versions This script updates NuGet package versions in the Directory.Packages.props file by querying the latest available versions and updating the Version attributes accordingly, while respecting the PreserveMajor attribute and pre-release version detection. * Update script paths in package-update.yml * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update package-update workflow to use cron schedule Changed the trigger for package updates to a scheduled cron job. * Update .github/scripts/Update-NuGetPackageVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Gate PR creation on commit detection in package-update workflow (#796) * Initial plan * Gate PR creation on changes detection flag Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Update .github/scripts/Update-NuGetPackageVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add pull_request_target trigger to workflow * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update package-update.yml * Update package-update.yml * Rename checkout step for clarity * Remove GitHub CLI installation from package-update.yml Removed GitHub CLI installation step from workflow. * Update Update-NuGetPackageVersions.ps1 * Fix label assignment in package-update workflow * Remove 'powershell' label from package update PR Removed the 'powershell' label from the automated package update PR. * Add label to automated package update PR * Fix label formatting in package-update.yml * Add token input for create pull request action * Update GH_TOKEN to use secrets for PR creation * Update package-update.yml * Add script to update .NET SDK and MSBuild SDK versions This script updates .NET SDK and MSBuild SDK versions in the global.json file by querying the latest releases and modifying the file accordingly. * Add step to update .NET SDK versions in workflow * Change fetch-depth from 0 to 1 in workflow * Update package-update.yml to remove pull_request trigger Remove pull_request trigger from package-update workflow * Prevent branch name collisions in package-update workflow (#825) * Initial plan * Add run_attempt to branch name and concurrency group to prevent collisions Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Enable cancellation of in-progress package updates --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Fix SourcesDirectory parameter fallback for GitHub Actions in Update-DotNetSdkVersions.ps1 (#826) * Initial plan * Add fallback logic for SourcesDirectory in Update-DotNetSdkVersions.ps1 Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Update .github/workflows/package-update.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/scripts/Update-DotNetSdkVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update package-update.yml * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Update-NuGetPackageVersions.ps1 * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Rename workflow steps for clarity * Update .github/scripts/Update-NuGetPackageVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix prerelease suffix ordering in Update-DotNetSdkVersions.ps1 (#831) * Initial plan * fix: replace simple string suffix comparison with token-by-token Compare-PreReleaseSuffix in Update-DotNetSdkVersions.ps1 Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Replace Azure Pipelines logging commands with GitHub Actions-native annotations in NuGet update script (#830) * Initial plan * Replace ##[section] Azure Pipelines logging with GitHub Actions ::notice:: annotations Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/scripts/Update-NuGetPackageVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/scripts/Update-DotNetSdkVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/scripts/Update-NuGetPackageVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/scripts/Update-DotNetSdkVersions.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix Get-LatestPackageVersion ignoring prerelease flag and configfile in dotnet args (#833) * Initial plan * Fix Get-LatestPackageVersion to correctly use prerelease and configfile args Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com> * Add NuGetConfigPath option and update workflow Introduce an optional NugetConfigPath parameter to Update-NuGetPackageVersions.ps1 and Update-DotNetSdkVersions.ps1 so the scripts can use a configurable NuGet config file (default: NuGet.Config). Update verbose messages and warnings to reference the chosen config path and simplify config selection logic to prefer the provided config name. Update the package-update GitHub Actions workflow to pass NuGet-GitHub.Config to both scripts and switch actions/setup-dotnet to use the repository global.json (global-json-file) instead of a hardcoded dotnet-version. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Neil Richardson <neil.richardson@microsoft.com>
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.
Addresses feedback from PR #794 where the workflow would fail when no package updates are available. The commit step exits successfully when
git diff --cached --quietis true, but the PR creation step still runs withif: success()and fails due to the missing remote branch.Changes:
has-changesto propagate change detection statehas-changes=falsewhen no staged changes detected,has-changes=trueafter successful pushsteps.commit.outputs.has-changes == 'true'instead ofsuccess()✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.