Skip to content
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

Adding workflow to update dependencies weekly #7944

Merged
merged 5 commits into from
Mar 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,79 +4,6 @@ registries:
type: nuget-feed
url: https://api.nuget.org/v3/index.json
updates:
- package-ecosystem: nuget
directory: "/"
registries:
- public-nuget
schedule:
day: monday
interval: weekly
time: "07:00"
timezone: "America/Los_Angeles"
open-pull-requests-limit: 15
ignore:
# handled by Darc/Maestro flows
- dependency-name: "Microsoft.DotNet.Arcade.Sdk"
- dependency-name: "Microsoft.DotNet.Helix.Sdk"
- dependency-name: "Microsoft.DotNet.SharedFramework.Sdk"
- dependency-name: "Microsoft.Build.NoTargets"
# Pinned versions that should not be updated
- dependency-name: "Microsoft.CodeAnalysis.CSharp"
# See https://github.com/dotnet/aspire/issues/7123
- dependency-name: "OpenTelemetry.*"
# NetPlatform dependencies shouldn't update across major versions
- dependency-name: "Microsoft.AspNetCore.*"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.EntityFrameworkCore.*"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.Extensions.*"
update-types: ["version-update:semver-major"]
- dependency-name: "System.*"
update-types: ["version-update:semver-major"]
- dependency-name: "Npgsql.*"
update-types: ["version-update:semver-major"]
groups:
Azure:
patterns:
- "Azure.*"
- "Microsoft.Azure.*"
- "Microsoft.Extensions.Azure"
AspNetCoreHealthChecks:
patterns:
- "AspNetCore.HealthChecks.*"
FluentUi:
patterns:
- "Microsoft.FluentUI.*"
Orleans:
patterns:
- "Microsoft.Orleans*"
NetPlatform:
patterns:
- "Microsoft.AspNetCore.*"
- "Microsoft.EntityFrameworkCore.*"
- "Microsoft.Extensions.*"
- "System.*"
update-types:
- 'minor'
- 'patch'
Npgsql:
patterns:
- "Npgsql.*"
update-types:
- 'minor'
- 'patch'
MicrosoftDotNet:
patterns:
- "Microsoft.DotNet.*"
Grpc:
patterns:
- "Grpc.*"
Polly:
patterns:
- "Polly.*"
labels:
- "area-codeflow"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Update Dependencies"

on:
workflow_dispatch:
schedule:
- cron: "0 16 * * 1" # Mondays at 8am PST

permissions:
contents: write
pull-requests: write

jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET 9
uses: actions/setup-dotnet@v3
with:
dotnet-version: "9.0.x"

- name: Restore solution
run: ./build.sh -restore

- name: Rewrite nuget.config
run: dotnet new nugetconfig --force

- name: Install dotnet-outdated
run: dotnet tool install --global dotnet-outdated-tool

- name: Update packages
run: dotnet outdated --no-restore -u ./Aspire.sln

- name: Revert all changes except Directory.Packages.props
run: |
git add Directory.Packages.props
rm nuget.config
git checkout -- .

- name: Create Pull Request
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-dependencies
commit-message: "[Automated] Updating package dependencies"
title: "[Automated] Update dependencies"
body: "Auto-generated update to the package dependencies. In order for this PR to be green, it will require all of the new dependencies to be [mirrored to our AzDO NuGet feeds](https://github.com/dotnet/arcade/blob/main/Documentation/MirroringPackages.md). Any updates made outside of the first itemgroup in Directory.Packages.props should be reverted as those are packages that get updated through arcade's dependency flow."
15 changes: 8 additions & 7 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@
<PackageVersion Include="AspNetCore.HealthChecks.Redis" Version="9.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.SqlServer" Version="9.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Uris" Version="9.0.0" />
<!-- dotnet/extensions dependencies-->
<PackageVersion Include="Microsoft.Extensions.AI" Version="$(MicrosoftExtensionsAIVersion)" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="$(MicrosoftExtensionsAIVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Testing" Version="$(MicrosoftExtensionsDiagnosticsTestingVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="$(MicrosoftExtensionsHttpResilienceVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(MicrosoftExtensionsTimeProviderTestingVersion)" />
<!-- NuGet dependencies -->
<PackageVersion Include="NuGet.ProjectModel" Version="6.12.1" />
<!-- external dependencies -->
Expand Down Expand Up @@ -173,9 +167,16 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<!-- The following 2 groups are for packages that need to switch based on the .NET TFM being used. -->
<!-- The following 2 groups are for packages that need to switch based on the .NET TFM being used.
The dependencies on any of these two groups should not be updated manually and should instead use arcade's dependency flow to get updated.-->

<ItemGroup>
<!-- dotnet/extensions dependencies ** Common between net8 and net9 ** -->
<PackageVersion Include="Microsoft.Extensions.AI" Version="$(MicrosoftExtensionsAIVersion)" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="$(MicrosoftExtensionsAIVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Testing" Version="$(MicrosoftExtensionsDiagnosticsTestingVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="$(MicrosoftExtensionsHttpResilienceVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(MicrosoftExtensionsTimeProviderTestingVersion)" />
<!-- EF -->
<PackageVersion Include="Microsoft.EntityFrameworkCore.Cosmos" Version="$(MicrosoftEntityFrameworkCoreCosmosLTSVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="$(MicrosoftEntityFrameworkCoreDesignLTSVersion)" />
Expand Down