File: a_pre_commit.yml

package info (click to toggle)
pyecotrend-ista 3.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,520 kB
  • sloc: python: 1,497; makefile: 3
file content (59 lines) | stat: -rw-r--r-- 1,766 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Pre-commit

on:
  pull_request_target:
    types:
      - closed
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  update:
    if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
    runs-on: ubuntu-latest
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
        with:
          egress-policy: audit

      - name: Checkout repository
        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
        with:
          persist-credentials: false
      - name: Set up Python
        uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
        with:
          python-version: |
            3.13
      - name: Install Dependencies
        run: |
          pip install pre-commit
          pre-commit install
      - name: Pre-commit and auto commit
        run: |
          pre-commit run --all-files -c .pre-commit-config.yaml --show-diff-on-failure || true
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11
        with:
          token: ${{ secrets.TOKEN }}
          commit-message: Update files
          committer: GitHub Action <action@github.com>
          author: GitHub Action <action@github.com>
          signoff: true
          branch: pre-commit
          # base: main
          title: "🔨 Update files by <github-actions[bot]>"
          body: |
            Auto-generated by [create-pull-request][1]

            [1]: https://github.com/peter-evans/create-pull-request
          labels: |
            wait
            in progress
            bot
          draft: false
          delete-branch: true