Skip to content

Commit 4e79a9e

Browse files
fix: precommit workflow
1 parent a8f1b7b commit 4e79a9e

File tree

2 files changed

+58
-16
lines changed

2 files changed

+58
-16
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Pre-Commit
3+
on:
4+
merge_group:
5+
pull_request:
6+
branches:
7+
- main
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
push:
13+
branches:
14+
- main
15+
schedule:
16+
# Run once a week (see https://crontab.guru)
17+
- cron: "0 0 * * 0"
18+
workflow_dispatch:
19+
20+
concurrency:
21+
group: pre-commit-${{ github.run_id }}
22+
cancel-in-progress: true
23+
24+
env:
25+
PYTHON_VERSION: 3.12.6
26+
TASK_VERSION: 3.38.0
27+
28+
permissions:
29+
actions: read
30+
checks: write
31+
contents: read
32+
pull-requests: write # Allows merge queue updates
33+
security-events: write # Required for GitHub Security tab
34+
35+
jobs:
36+
pre-commit:
37+
name: Pre-commit
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Set up git repository
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
45+
with:
46+
python-version: ${{ env.PYTHON_VERSION }}
47+
48+
- name: Install python dependencies
49+
run: python3 -m pip install pre-commit
50+
51+
- name: Setup go-task
52+
uses: rnorton5432/setup-task@eec4717ae80f02d1614a4fecfa4a55d507768696 # v1.0.0
53+
if: always()
54+
with:
55+
task-version: ${{ env.TASK_VERSION }}
56+
57+
- name: Run pre-commit
58+
run: export TASK_X_REMOTE_TASKFILES=1 task run-pre-commit -y || true

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)