From ae02d1785756be7319f8c7534e0bc99485995758 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Tue, 13 Dec 2022 22:38:02 +0000 Subject: [PATCH 1/2] Add potential fix for dependabot --- .github/dependabot.yml | 8 +++++ .../dependabot-packagelock-update.yml | 33 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-packagelock-update.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..16811ffb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + # Enable version updates for npm + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "weekly" + day: "wednesday" diff --git a/.github/workflows/dependabot-packagelock-update.yml b/.github/workflows/dependabot-packagelock-update.yml new file mode 100644 index 00000000..fb63ed19 --- /dev/null +++ b/.github/workflows/dependabot-packagelock-update.yml @@ -0,0 +1,33 @@ +name: Check for dependabot update + +on: [pull_request] + +jobs: + restore: + name: Fix NuGet Lock Files + if: contains(github.head_ref, 'dependabot') && github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 4.7.2 + 4.8 + 6.0 + - run: dotnet restore --force-evaluate + - id: diff + continue-on-error: true + run: | + git add -N . + git diff --name-only --exit-code + - if: steps.diff.outcome == 'failure' + run: | + git config user.email "github-actions[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + git add . + git commit -m "chore(deps): update NuGet lock file" + git push From 36e48f58f624d43200bb597f1a4277b254ec7dd0 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Tue, 13 Dec 2022 23:07:56 +0000 Subject: [PATCH 2/2] Use windows vm Dont bother installing .net --- .../workflows/dependabot-packagelock-update.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dependabot-packagelock-update.yml b/.github/workflows/dependabot-packagelock-update.yml index fb63ed19..915f36a6 100644 --- a/.github/workflows/dependabot-packagelock-update.yml +++ b/.github/workflows/dependabot-packagelock-update.yml @@ -6,24 +6,27 @@ jobs: restore: name: Fix NuGet Lock Files if: contains(github.head_ref, 'dependabot') && github.event_name == 'pull_request' - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 with: ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 4.7.2 - 4.8 - 6.0 + + # - uses: actions/setup-dotnet@v3 + # with: + # dotnet-version: | + # 4.7.2 + # 4.8 + # 6.0 + - run: dotnet restore --force-evaluate - id: diff continue-on-error: true run: | git add -N . git diff --name-only --exit-code + - if: steps.diff.outcome == 'failure' run: | git config user.email "github-actions[bot]@users.noreply.github.com"