pre-commit #125
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
name: pre-commit | |
on: | |
schedule: | |
- cron: "0 0 * * 0" # every Sunday at 00:00 UTC | |
workflow_dispatch: | |
jobs: | |
autoupdate: | |
name: autoupdate | |
runs-on: ubuntu-latest | |
if: github.repository == 'hgrecco/pint' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: Cache pip and pre-commit | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/pre-commit | |
~/.cache/pip | |
key: ${{ runner.os }}-pre-commit-autoupdate | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: install dependencies | |
run: python -m pip install --upgrade pre-commit | |
- name: version info | |
run: python -m pip list | |
- name: autoupdate | |
uses: technote-space/create-pr-action@bfd4392c80dbeb54e0bacbcf4750540aecae6ed4 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
EXECUTE_COMMANDS: | | |
python -m pre_commit autoupdate | |
python -m pre_commit run --all-files | |
COMMIT_MESSAGE: 'pre-commit: autoupdate hook versions' | |
COMMIT_NAME: 'github-actions[bot]' | |
COMMIT_EMAIL: 'github-actions[bot]@users.noreply.github.com' | |
PR_TITLE: 'pre-commit: autoupdate hook versions' | |
PR_BRANCH_PREFIX: 'pre-commit/' | |
PR_BRANCH_NAME: 'autoupdate-${PR_ID}' |