-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (35 loc) · 1.1 KB
/
pre-commit.yml
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
name: pre-commit
on:
pull_request:
types:
- opened
- reopened
- ready_for_review
- synchronize
jobs:
pre-commit:
runs-on: ubuntu-latest
name: Run pre-commit
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: 🏗️ Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.x"
- name: 🏗️ Set up Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: "20.17.0"
cache: "yarn"
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn install
- name: Run pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: |
--from-ref "${{ github.event.pull_request.base.sha }}" \
--to-ref "${{ github.event.pull_request.head.sha }}"