File: pre-commit-update.yml

package info (click to toggle)
python-xknx 3.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,064 kB
  • sloc: python: 40,895; javascript: 8,556; makefile: 32; sh: 12
file content (43 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download
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
name: Pre-commit auto-update

on:
  schedule:
    - cron: "0 8 15 * *"
  # on demand
  workflow_dispatch:

jobs:
  auto-update:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: "3.x"
          cache: "pip"
          cache-dependency-path: |
            requirements/production.txt
            requirements/testing.txt
            .pre-commit-config.yaml
      - name: Install dependencies
        # needed for the mypy hook
        run: |
          pip install -r requirements/testing.txt
      - name: Pre-commit auto-update
        env:
          # new branch is created in create-pull-request step
          SKIP: no-commit-to-branch
        run: |
          pre-commit autoupdate
      - uses: peter-evans/create-pull-request@v8
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          branch: update/pre-commit-hooks
          title: Update pre-commit hooks
          commit-message: "update pre-commit hooks"
          labels: |
            dependencies
          body: |
            Update versions of pre-commit hooks to latest version.
            Run tests locally to check for conflicts since PRs from GitHub Actions don't trigger workflows.