-
-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (35 loc) · 1.32 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
name: Lint
on: [push, pull_request_target]
jobs:
lint:
name: Lint Resource
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.event.pull_request.head.sha }}
- name: Check for lua changes
id: check_changes
run: |
if git diff --quiet HEAD^ HEAD -- '*.lua'; then
echo "No changes to lua files. Skipping step."
echo "skip_step=true" >> $GITHUB_ENV
else
echo "Changes detected to lua files. Proceeding with step."
echo "skip_step=false" >> $GITHUB_ENV
fi
- name: Lint
if: env.skip_step == 'false'
uses: iLLeniumStudios/fivem-lua-lint-action@v2
with:
capture: "junit.xml"
args: "-t --formatter JUnit"
extra_libs: ox_lib+mysql+qblocales+qbox+qbox_playerdata+qbox_lib
- name: Generate Lint Report
if: env.skip_step == 'false'
uses: mikepenz/action-junit-report@v4
with:
report_paths: "**/junit.xml"
check_name: Linting Report
fail_on_failure: false