Skip to content

Commit

Permalink
ci: dependabot automerge (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
yxtay authored Feb 11, 2025
1 parent 2f27414 commit b4fc0c4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
version: 2

updates:
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
reviewers: [yxtay]
commit-message:
prefix: build(docker)
groups:
docker:
patterns: ["*"]
update-types: [minor, patch]

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
reviewers: [yxtay]
commit-message:
prefix: ci(github-actions)
groups:
github-actions:
patterns: ["*"]
update-types: [minor, patch]

- package-ecosystem: pip
directory: /
schedule:
interval: weekly
reviewers: [yxtay]
commit-message:
prefix: build(pip)
groups:
pip:
patterns: ["*"]
update-types: [minor, patch]
23 changes: 22 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: pr

on:
pull_request:
# pull_request_target: # for forked PR
types:
- opened
- edited
Expand Down Expand Up @@ -46,3 +45,25 @@ jobs:
package-lock.json
*.lock
docs/**
dependabot:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- id: metadata
uses: dependabot/fetch-metadata@v2

- name: log metadata
env:
DEPENDABOT_METADATA: ${{ toJson(steps.metadata.outputs) }}
run: echo ${DEPENDABOT_METADATA}

- name: automerge
if: ${{ !contains(steps.metadata.outputs.update-type, 'major' ) }}
run: gh pr merge --merge ${PR_NUMBER}
env:
MR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
GH_TOKEN: ${{ github.token }}
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ repos:
- id: trailing-whitespace
args: [--markdown-linebreak-ext, md]

# files
- id: check-case-conflict
# files
- id: check-executables-have-shebangs
- id: check-symlinks
- id: destroyed-symlinks
- id: fix-byte-order-marker

# git
- id: check-added-large-files
# git
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: no-commit-to-branch
- id: forbid-new-submodules

# security
- id: detect-aws-credentials
# security
args: [--allow-missing-credentials]
- id: detect-private-key

Expand All @@ -70,7 +70,7 @@ repos:
- id: markdownlint

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.5
rev: v0.9.6
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -84,11 +84,11 @@ repos:
- id: taplo-format

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.29
rev: 0.5.30
hooks:
- id: uv-lock

- repo: https://github.com/google/yamlfmt
rev: v0.15.0
rev: v0.16.0
hooks:
- id: yamlfmt

0 comments on commit b4fc0c4

Please sign in to comment.