Skip to content

Commit

Permalink
chore: tweak dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
Nr18 committed Oct 18, 2023
1 parent de992ee commit d703853
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
assignees:
- "Nr18"
# groups:
# dependencies:
# patterns:
# - "*"
29 changes: 22 additions & 7 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
name: auto-merge

on:
pull_request:
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: ${{ secrets.TOKEN }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a 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: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d703853

Please sign in to comment.