File: lint-autoupdate.yml

package info (click to toggle)
flexparser 0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 380 kB
  • sloc: python: 2,558; makefile: 4
file content (46 lines) | stat: -rw-r--r-- 1,474 bytes parent folder | download | duplicates (2)
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
43
44
45
46
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/flexparser'
    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}'