Skip to content

Commit

Permalink
ci: enable dependabot checks and auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Nov 21, 2023
1 parent 46912fc commit a8c12f6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/demo/BaseComponent"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/demo/CategoriesComponent"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/demo/ProductsComponent"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/demo/RootComponent"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/demo/SuppliersComponent"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci(github-actions)"
- package-ecosystem: npm
directory: "/demo"
schedule:
interval: weekly
reviewers:
- flovogt
versioning-strategy: increase
commit-message:
prefix: "deps"
prefix-development: "build(deps-dev)"
26 changes: 26 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dependabot auto-merge
on:
pull_request:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type)}}
run: gh pr review --approve "$PR_URL" && gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit a8c12f6

Please sign in to comment.