Skip to content

Commit

Permalink
chore(template): sync with dailydevops/dotnet-template
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion committed Aug 28, 2023
1 parent ec0bcc9 commit 45c8cd9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
25 changes: 21 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,40 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "weekly"
commit-message:
prefix: "build(ci)"
labels:
- "dependency"
- package-ecosystem: "nuget" # See documentation for possible values
- "dependency-actions"

- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "build(deps)"
labels:
- "dependency"
- "dependency-nuget"
open-pull-requests-limit: 20
groups:
coverlet:
patterns:
- "coverlet*"
testcontainers:
patterns:
- "testcontainers*"
verify:
patterns:
- "verify*"
xunit:
patterns:
- "xunit*"

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "build(mods)"
labels:
- "dependency-gitmodule"
27 changes: 6 additions & 21 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@ name: Auto Merge Minor Upgrades

on:
pull_request:

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
- name: Dependabot Auto Merge
uses: ahmadnassri/[email protected]
with:
target: minor
github-token: ${{ secrets.DEPENDABOT }}

- name: Approve Minor PR
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: |
gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.DEPENDABOT }}

- name: Enable auto-merge for Dependabot Pull Request
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL" --subject "$PR_MESSAGE [skip ci]"
env:
PR_MESSAGE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.DEPENDABOT }}
command: squash and merge

0 comments on commit 45c8cd9

Please sign in to comment.