Skip to content

Commit 123bb52

Browse files
committed
Trying a different Linter GitHub Action
1 parent 20eb51e commit 123bb52

File tree

1 file changed

+49
-11
lines changed

1 file changed

+49
-11
lines changed

.github/workflows/lint.yaml

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,54 @@
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+
118
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' }}
325

426
jobs:
5-
lint:
6-
name: Lint
27+
lua-check:
28+
name: Lua Check
729
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+
837
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 }}

0 commit comments

Comments
 (0)