Skip to content

Commit

Permalink
ci: update lock file on dependabot pushed (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
nogic1008 committed Jul 22, 2021
1 parent 1a70d44 commit 621dd02
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/dependabot-restore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Update NuGet Lock file

on:
push:
branches:
- dependabot/nuget/**

jobs:
update:
name: Update NuGet Lock file
if: contains(github.actor, 'dependabot')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/cache@v2.1.6
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core 3.1 SDK
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 3.1.x
- name: Setup .NET 5.0 SDK
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 5.0.x

- name: Restore
run: dotnet restore

- name: Count changes
id: changes
run: |
git add -N .
echo "::set-output name=count::$(git diff --name-only | wc -l)"
- name: Commit & Push
if: steps.changes.outputs.count > 0
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "chore(deps): update NuGet lock files"
git push

0 comments on commit 621dd02

Please sign in to comment.