-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (37 loc) · 1.23 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
42
43
44
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: 🏗️ Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.x"
- name: 🏗️ Set up Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: "20.17.0"
cache: "yarn"
cache-dependency-path: "yarn.lock"
- name: 🏗️ Set up Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
- 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 }}"