CI auto-update #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v6 | |
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 }}" |