Skip to content

Commit 0b3bdeb

Browse files
committed
ci(pr-checks): switch to mise toolchain and prek hooks
Refine pull_request triggers to opened, reopened, synchronize, ready_for_review. Add concurrency group to cancel in-progress runs. Set contents:read permissions Replace setup-python/pre-commit action with mise-action and prek run
1 parent d86fdba commit 0b3bdeb

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/pr-checks.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22
name: Pull Request validation
33

44
on:
5-
- pull_request
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
12+
concurrency:
13+
group: pr-validation-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
618

719
jobs:
820
pre-commit:
@@ -12,13 +24,11 @@ jobs:
1224
id: checkout
1325
uses: actions/checkout@v5
1426

15-
- name: Set up Python
16-
id: setup-python
17-
uses: actions/setup-python@v5
27+
- name: Setup toolchain with mise
28+
uses: jdx/mise-action@v2
1829

19-
- name: Run pre-commit checks
20-
id: pre-commit
21-
uses: cloudposse/github-action-pre-commit@v4.0.0
30+
- name: Run prek hooks
31+
run: prek run --all-files --show-diff-on-failure --color=always
2232

2333
- name: Build Docker image if Dockerfile changed
2434
run: |

0 commit comments

Comments
 (0)