forked from Kong/lua-resty-aws
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.16 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Lint
on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
lua-check:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: Lua Check
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
checks: write
pull-requests: write
if: (github.actor != 'dependabot[bot]')
steps:
- name: Checkout source code
uses: actions/checkout@v3
# Optional step to run on only changed files
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@54849deb963ca9f24185fb5de2965e002d066e6b # v37
with:
files: |
**.lua
- name: Lua Check
if: steps.changed-files.outputs.any_changed == 'true'
uses: Kong/public-shared-actions/code-check-actions/lua-lint@a98be0184f832cb24a9dd233f99074e8ba17b488 # v2.3.3
with:
additional_args: '--no-default-config --config .luacheckrc'
files: ${{ steps.changed-files.outputs.all_changed_files }}
action_fail: true