| 1 |
name: pre-commit |
| 2 |
|
| 3 |
on: |
| 4 |
schedule: |
| 5 |
- cron: "0 0 * * 0" |
| 6 |
workflow_dispatch: |
| 7 |
|
| 8 |
|
| 9 |
jobs: |
| 10 |
autoupdate: |
| 11 |
name: autoupdate |
| 12 |
runs-on: ubuntu-latest |
| 13 |
if: github.repository == 'hgrecco/flexparser' |
| 14 |
steps: |
| 15 |
- name: checkout |
| 16 |
uses: actions/checkout@v2 |
| 17 |
- name: Cache pip and pre-commit |
| 18 |
uses: actions/cache@v2 |
| 19 |
with: |
| 20 |
path: | |
| 21 |
~/.cache/pre-commit |
| 22 |
~/.cache/pip |
| 23 |
key: ${{ runner.os }}-pre-commit-autoupdate |
| 24 |
- name: setup python |
| 25 |
uses: actions/setup-python@v2 |
| 26 |
with: |
| 27 |
python-version: 3.x |
| 28 |
- name: upgrade pip |
| 29 |
run: python -m pip install --upgrade pip |
| 30 |
- name: install dependencies |
| 31 |
run: python -m pip install --upgrade pre-commit |
| 32 |
- name: version info |
| 33 |
run: python -m pip list |
| 34 |
- name: autoupdate |
| 35 |
uses: technote-space/create-pr-action@bfd4392c80dbeb54e0bacbcf4750540aecae6ed4 |
| 36 |
with: |
| 37 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 38 |
EXECUTE_COMMANDS: | |
| 39 |
python -m pre_commit autoupdate |
| 40 |
python -m pre_commit run --all-files |
| 41 |
COMMIT_MESSAGE: 'pre-commit: autoupdate hook versions' |
| 42 |
COMMIT_NAME: 'github-actions[bot]' |
| 43 |
COMMIT_EMAIL: 'github-actions[bot]@users.noreply.github.com' |
| 44 |
PR_TITLE: 'pre-commit: autoupdate hook versions' |
| 45 |
PR_BRANCH_PREFIX: 'pre-commit/' |
| 46 |
PR_BRANCH_NAME: 'autoupdate-${PR_ID}' |