Skip to content

Commit

Permalink
automerge dep upgrades that pass ci
Browse files Browse the repository at this point in the history
Signed-off-by: clux <sszynrae@gmail.com>
  • Loading branch information
clux committed Oct 21, 2023
1 parent 67b8c29 commit b281503
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 15 deletions.
37 changes: 22 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,36 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
commit-message:
prefix: "[Action]"
schedule:
interval: "monthly"

- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
ignore:
- dependency-name: "rust"
update-types: ["version-update:semver-major"]
commit-message:
prefix: "[Docker]"
interval: "weekly"

- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "[Cargo]"
groups:
kube:
patterns:
- kube
- k8s-openapi
core:
patterns:
- serde
- serde_*
- serde-*
- anyhow
- thiserror
- log
- env_logger
- syn
- quote
- heck
- tokio
- typed-builder
- clap
- clap-*
- clap_*
- schemars
rest:
patterns:
- .*
28 changes: 28 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Automerge
on: pull_request

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: 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: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
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 b281503

Please sign in to comment.