File tree 1 file changed +49
-11
lines changed 1 file changed +49
-11
lines changed Original file line number Diff line number Diff line change
1
+ # name: Lint
2
+ # on: [push, pull_request]
3
+
4
+ # jobs:
5
+ # lint:
6
+ # name: Lint
7
+ # runs-on: ubuntu-latest
8
+ # steps:
9
+ # - name: checkout
10
+ # uses: actions/checkout@v4
11
+ # with:
12
+ # repository: 'ps-wow/action-test-repo'
13
+ # - name: wow-lint
14
+ # uses: davidcraig/[email protected]
15
+ # with:
16
+ # path-to-files: '**/*.lua'
17
+
1
18
name : Lint
2
- on : [push, pull_request]
19
+
20
+ on : [push, pull_request, workflow_dispatch]
21
+
22
+ concurrency :
23
+ group : ${{ github.workflow }}-${{ github.ref }}
24
+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
3
25
4
26
jobs :
5
- lint :
6
- name : Lint
27
+ lua-check :
28
+ name : Lua Check
7
29
runs-on : ubuntu-latest
30
+ permissions :
31
+ contents : read
32
+ issues : read
33
+ checks : write
34
+ pull-requests : write
35
+ if : (github.actor != 'dependabot[bot]')
36
+
8
37
steps :
9
- - name : checkout
10
- uses : actions/checkout@v4
11
- with :
12
- repository : ' ps-wow/action-test-repo'
13
- - name : wow-lint
14
- uses :
davidcraig/[email protected]
15
- with :
16
- path-to-files : ' **/*.lua'
38
+ - name : Checkout source code
39
+ uses : actions/checkout@v4
40
+
41
+ # Optional step to run on only changed files
42
+ - name : Get changed files
43
+ id : changed-files
44
+ uses : tj-actions/changed-files@54849deb963ca9f24185fb5de2965e002d066e6b # v37
45
+ with :
46
+ files : |
47
+ **.lua
48
+
49
+ - name : Lua Check
50
+ if : steps.changed-files.outputs.any_changed == 'true'
51
+ uses : Kong/public-shared-actions/code-check-actions/lua-lint@33449c46c6766a3d3c8f167cc383381225862b36
52
+ with :
53
+ additional_args : ' --no-default-config --config .luacheckrc'
54
+ files : ${{ steps.changed-files.outputs.all_changed_files }}
You can’t perform that action at this time.
0 commit comments