Skip to content

Commit

Permalink
feat: setup dependabot + automerge
Browse files Browse the repository at this point in the history
  • Loading branch information
BDav24 committed Jan 10, 2024
1 parent 779001d commit 3bbdb2d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
35 changes: 35 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Dependabot auto-merge

on:
pull_request:
branches: [master]

jobs:
if-dependabot:
if: ${{ github.actor == 'dependabot[bot]' }}

runs-on: ubuntu-latest

steps:
- run: echo The PR is from dependabot!

test:
uses: ./.github/workflows/ci-test.yml

needs: if-dependabot

dependabot-auto-merge:
runs-on: ubuntu-latest

needs: test

permissions:
contents: write # to be able to publish a GitHub release
pull-requests: write # to be able to comment on released pull requests

steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 3bbdb2d

Please sign in to comment.