Skip to content

Commit

Permalink
Merge pull request #728 from devinit/feature/dependabot-config
Browse files Browse the repository at this point in the history
Feature/Dependabot Config
  • Loading branch information
edwinmp authored Jul 5, 2022
2 parents e3c79d8 + 13bb263 commit 15bff28
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
labels:
- "npm"
- "dependencies"
schedule:
interval: "daily"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"

# Enable version updates for pip
- package-ecosystem: "pip"
directory: "/"
labels:
- "pip"
- "dependencies"
schedule:
interval: "daily"
22 changes: 22 additions & 0 deletions .github/workflows/dependabotautomerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.1.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for dependabot PRs
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
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 15bff28

Please sign in to comment.