-
Notifications
You must be signed in to change notification settings - Fork 22
88 lines (72 loc) · 2.14 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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:
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@v4
# Optional step to run on only changed files
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # 45.0.4
with:
files: |
**.lua
- name: Lua Check
if: steps.changed-files.outputs.any_changed == 'true'
uses: Kong/public-shared-actions/code-check-actions/lua-lint@v2
with:
additional_args: '--no-default-config --config .luacheckrc'
files: ${{ steps.changed-files.outputs.all_changed_files }}
rust-fmt:
name: Rust Fmt
runs-on: ubuntu-latest
if: (github.actor != 'dependabot[bot]')
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Run Rust Fmt
run: cargo fmt --all -- --check # only check, don't format
rust-clippy:
name: Rust Clippy
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
checks: write
pull-requests: write
# only required for workflows in private repositories
actions: read
contents: read
if: (github.actor != 'dependabot[bot]')
steps:
- name: Checkout source code
uses: actions/checkout@v4
# Optional step to run on only changed files
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # 45.0.4
with:
files: |
**.rs
- name: Rust Clippy
if: steps.changed-files.outputs.any_changed == 'true'
uses: Kong/public-shared-actions/code-check-actions/rust-lint@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}