File tree 1 file changed +55
-0
lines changed
1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : " Run Pre Commit Checks"
3
+
4
+ on : # yamllint disable-line rule:truthy
5
+ push :
6
+ branches :
7
+ - ' **'
8
+ - ' !main'
9
+
10
+ concurrency :
11
+ group : ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress : true
13
+
14
+ jobs :
15
+ # # run pre-commit
16
+ pre-commit :
17
+ name : Run pre-commit checks
18
+ runs-on : ubuntu-latest
19
+ permissions :
20
+ contents : write
21
+ pull-requests : write
22
+ actions : write
23
+ pages : write
24
+ id-token : write
25
+
26
+ steps :
27
+ - name : Checkout
28
+ uses : actions/checkout@v4
29
+ with :
30
+ token : ${{ secrets.ARC_JOB_TOKEN }}
31
+
32
+ - uses : actions/setup-python@v3
33
+
34
+ - name : Install terraform-docs
35
+ run : |
36
+ cd /tmp
37
+ curl -sSLo ./terraform-docs.tar.gz \
38
+ https://terraform-docs.io/dl/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz
39
+ tar -xzf terraform-docs.tar.gz
40
+ rm terraform-docs.tar.gz
41
+ chmod +x terraform-docs
42
+ mv terraform-docs /usr/local/bin/terraform-docs
43
+ - name : Install tflint
44
+ run : |
45
+ cd /tmp
46
+ curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
47
+ - name : Run pre-commit
48
+ uses : pre-commit/action@v3.0.0
49
+ continue-on-error : true # we want to push the changes pre-commit makes
50
+
51
+ - name : Push pre-commit changes to branch
52
+ uses : stefanzweifel/git-auto-commit-action@v5
53
+ with :
54
+ commit_message : Push pre-commit changes
55
+
You can’t perform that action at this time.
0 commit comments