File tree 1 file changed +54
-0
lines changed
1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Apply linters
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ branch_name :
7
+ description : ' Branch name to run the workflow on'
8
+ required : true
9
+ type : string
10
+
11
+ env :
12
+ NODE : " 18"
13
+ FRONTEND_MONOREPO_DIR : " web"
14
+
15
+ jobs :
16
+ lint :
17
+ runs-on : ubuntu-latest
18
+
19
+ steps :
20
+ - name : Checkout code
21
+ uses : actions/checkout@v4
22
+ with :
23
+ token : ${{ secrets.GIT_PAT }}
24
+ ref : ${{ inputs.branch_name }}
25
+
26
+ - name : Set up Python
27
+ uses : actions/setup-python@v4
28
+ with :
29
+ python-version : ' 3.12'
30
+
31
+ - name : Install pre-commit
32
+ run : |
33
+ python -m pip install --upgrade pip
34
+ pip install pre-commit
35
+
36
+ - name : Setup frontend environment
37
+ uses : ./.github/actions/setup-frontend-environment
38
+ with :
39
+ node-version : " ${{ env.NODE }}"
40
+ directory : " ${{ env.FRONTEND_MONOREPO_DIR }}"
41
+
42
+ - name : Run formatters
43
+ run : make fmt-all || true
44
+
45
+ - name : Ensure no lint remains
46
+ run : make fmt-all
47
+
48
+ - name : Commit changes
49
+ run : |
50
+ git config --global user.name "robot-ci-heartex"
51
+ git config --global user.email "[email protected] "
52
+ git add .
53
+ git commit -m "Apply pre-commit linters" || echo "No changes to commit"
54
+ git push
You can’t perform that action at this time.
0 commit comments