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