mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 02:31:08 +00:00
Update dependency update workflow
This commit is contained in:
parent
f2edfc12a3
commit
519ab33dc7
@ -8,7 +8,7 @@ on:
|
||||
jobs:
|
||||
updatePackages:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -17,30 +17,45 @@ jobs:
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.x.x
|
||||
|
||||
|
||||
- name: Install dotnet-outdated
|
||||
run: dotnet tool install --global dotnet-outdated-tool
|
||||
|
||||
|
||||
- name: Update packages
|
||||
id: outdated
|
||||
run: dotnet outdated CleanArchitecture.sln -u
|
||||
|
||||
|
||||
- name: Check for changes
|
||||
id: changes
|
||||
run: git diff --exit-code || echo "::set-output name=changes::true"
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.changes.outputs.changes == 'true'
|
||||
run: |
|
||||
git config user.name "${{ github.actor }}"
|
||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "Update packages"
|
||||
git push
|
||||
|
||||
|
||||
- name: Get current date
|
||||
if: steps.changes.outputs.changes == 'true'
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%d_%m_%Y')"
|
||||
|
||||
- name: Create Pull Request
|
||||
if: steps.changes.outputs.changes == 'true'
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: "update/${{ steps.date.outputs.date }}"
|
||||
title: Automatic Package Update
|
||||
label: dependencies
|
||||
delete-branch: true
|
||||
title: "Automatic Package Update ${{ steps.date.outputs.date }}"
|
||||
body: |
|
||||
This pull request includes updates to the packages in the solution.
|
||||
This pull request includes updates to the packages in the solution.
|
||||
|
||||
**Package Updates:**
|
||||
```
|
||||
${{ steps.outdated.outputs.stdout }}
|
||||
```
|
@ -12,8 +12,8 @@
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="MockQueryable.Moq" Version="7.0.0" />
|
||||
<PackageReference Include="Moq" Version="4.18.4" />
|
||||
<PackageReference Include="xunit" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
Loading…
Reference in New Issue
Block a user