Skip to content

Commit 9f692e2

Browse files
Felix ExnerRobertWilbrandt
authored andcommitted
Add mergify, dependabot and pre-commit update
This has been done on the driver already and is a great addition there.
1 parent aedef36 commit 9f692e2

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Update actions in workflows weekly
2+
3+
version: 2
4+
5+
updates:
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"

.github/mergify.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pull_request_rules:
2+
- name: Backport to humble branch
3+
conditions:
4+
- base=rolling
5+
- label=backport-humble
6+
actions:
7+
backport:
8+
branches:
9+
- humble

.github/workflows/update-ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Auto-update CI tools regularly
2+
3+
name: CI auto-update
4+
5+
on:
6+
schedule:
7+
# Run weekly
8+
- cron: '23 5 * * 0'
9+
workflow_dispatch:
10+
11+
jobs:
12+
ci_auto_update:
13+
name: CI auto-update
14+
runs-on: ubuntu-latest
15+
steps:
16+
# Setup pre-commit
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: 3.10.4
21+
- name: Install pre-commit
22+
run: pip install pre-commit
23+
24+
# Run update
25+
- name: Run pre-commit autoupdate
26+
run: pre-commit autoupdate
27+
28+
# Create pull request
29+
- name: Create pull-request
30+
id: cpr
31+
uses: peter-evans/create-pull-request@v5
32+
with:
33+
branch: update-ci/pre-commit-autoupdate
34+
delete-branch: true
35+
title: Auto-update pre-commit hooks
36+
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
37+
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
38+
commit-message: Auto-update pre-commit hooks
39+
labels: CI
40+
- name: Check outputs
41+
if: ${{ steps.cpr.pull-request-number }}
42+
run: echo "Opened pull request ${{ steps.cpr.outputs.pull-request-number }} - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)