Skip to content

Commit

Permalink
GitHubSync update
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Aug 5, 2021
1 parent 3f4aa62 commit bff50e8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 49 deletions.
45 changes: 0 additions & 45 deletions .dependabot/config.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ updates:
ignore:
- dependency-name: "*Analyzers"
versions:
- ">= 0"
- dependency-name: Catel.Core
versions:
- 5.12.12
- ">= 0"
37 changes: 37 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Dependabot auto-merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
# Checking the actor will prevent your Action run failing on non-Dependabot PRs
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve Dependabot PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for Dependabot PRs
if: |
${{ (startsWith(steps.dependabot-metadata.outputs.dependency-names, 'catel.') ||
startsWith(steps.dependabot-metadata.outputs.dependency-names, 'fody') ||
endsWith(steps.dependabot-metadata.outputs.dependency-names, '.fody') ||
startsWith(steps.dependabot-metadata.outputs.dependency-names, 'microsoft.') ||
startsWith(steps.dependabot-metadata.outputs.dependency-names, 'nunit') ||
startsWith(steps.dependabot-metadata.outputs.dependency-names, 'nunit3testadapter') ||
startsWith(steps.dependabot-metadata.outputs.dependency-names, 'orc.') ||
startsWith(steps.dependabot-metadata.outputs.dependency-names, 'orchestra.')) &&
steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
PR_NUMBER: ${{github.event.pull_request.number}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit bff50e8

Please sign in to comment.