-
Notifications
You must be signed in to change notification settings - Fork 235
42 lines (37 loc) · 1.23 KB
/
update-ci.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
37
38
39
40
41
42
# Auto-update CI tools regularly
name: CI auto-update
on:
schedule:
# Run weekly
- cron: '23 5 * * 0'
workflow_dispatch:
jobs:
ci_auto_update:
name: CI auto-update
runs-on: ubuntu-latest
steps:
# Setup pre-commit
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10.4
- name: Install pre-commit
run: pip install pre-commit
# Run update
- name: Run pre-commit autoupdate
run: pre-commit autoupdate
# Create pull request
- name: Create pull-request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
branch: update-ci/pre-commit-autoupdate
delete-branch: true
title: Auto-update pre-commit hooks
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
commit-message: Auto-update pre-commit hooks
labels: CI
- name: Check outputs
if: ${{ steps.cpr.pull-request-number }}
run: echo "Opened pull request ${{ steps.cpr.outputs.pull-request-number }} - ${{ steps.cpr.outputs.pull-request-url }}"