Skip to content

Commit 69a16db

Browse files
add workflow (#74)
* add workflow * fmt
1 parent 9aad074 commit 69a16db

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pre-commit Check
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Get changed files
14+
uses: tj-actions/changed-files@v41
15+
id: changed-files
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Set up Terraform
23+
uses: hashicorp/setup-terraform@v3
24+
with:
25+
terraform_version: latest
26+
27+
- name: Install pre-commit
28+
run: pip install pre-commit
29+
30+
- name: Run pre-commit on changed files
31+
run: |
32+
pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }} --hook-stage push

0 commit comments

Comments
 (0)