Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: dependabot automerge #145

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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