forked from divideprojects/Alita_Robot
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.17 KB
/
pre-commit-autoupdate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Pre-commit auto-update
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1" # every weekday at midnight
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
run: pre-commit autoupdate
- name: Create Pull Request
id: create_pull_request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: |
Update versions of tools in pre-commit
configs to latest version
labels: dependencies, automerge
- name: Automerge PR
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: squash
PULL_REQUEST: ${{ steps.create_pull_request.outputs.pull-request-number }}