Skip to content

Commit e4fe13c

Browse files
committed
Merge branch 'master' of github.com:CuteOne/BadRotations
2 parents ff93652 + d9b5785 commit e4fe13c

34 files changed

+41814
-496
lines changed

Diff for: .github/workflows/discord_notification.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- '.github/**'
77
- '.gitignore'
88
- '.gitattributes'
9+
- '.luacheckrc'
910
- 'config.ld'
1011
- 'README.md'
1112
- 'LICENSE'
@@ -18,7 +19,7 @@ jobs:
1819
runs-on: ubuntu-latest
1920
steps:
2021
- name: Checkout repository
21-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2223
- name: Run Discord Webhook
2324
uses: mrrobotdotapp/classic-discord-webhook@main
2425
with:

Diff for: .github/workflows/ldoc.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ jobs:
1111

1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Setup Python
17-
uses: actions/setup-python@v2
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.x'
2020

2121
- name: Install Python dependencies
2222
run: pip install beautifulsoup4
2323

2424
- name: Setup Lua
25-
uses: leafo/gh-actions-lua@v8
25+
uses: leafo/gh-actions-lua@v10
2626
with:
2727
luaVersion: "5.1"
2828

@@ -42,7 +42,7 @@ jobs:
4242
run: cp .github/assets/css/ldoc.css ./docs/
4343

4444
- name: Deploy to GitHub Pages
45-
uses: JamesIves/github-pages-deploy-action@4.1.5
45+
uses: JamesIves/github-pages-deploy-action@v4
4646
with:
4747
branch: gh-pages
4848
folder: docs

Diff for: .github/workflows/lint.yaml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Lint
2+
3+
on: [push]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
8+
9+
jobs:
10+
lua-check:
11+
name: Lua Check
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
issues: read
16+
checks: write
17+
pull-requests: read
18+
if: (github.actor != 'dependabot[bot]')
19+
20+
steps:
21+
- name: Checkout source code
22+
uses: actions/checkout@v4
23+
24+
# Optional step to run on only changed files
25+
- name: Get changed files
26+
id: changed-files
27+
uses: tj-actions/changed-files@v44
28+
with:
29+
files: |
30+
**.lua
31+
32+
- name: List changed files
33+
run: |
34+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
35+
echo "$file was changed"
36+
done
37+
38+
- name: Lua Check
39+
if: steps.changed-files.outputs.any_changed == 'true'
40+
uses: Kong/public-shared-actions/code-check-actions/lua-lint@main
41+
with:
42+
# additional_args: '--no-default-config --config .luacheckrc'
43+
files: ${{ steps.changed-files.outputs.all_changed_files }}
44+
45+
# name: Luacheck
46+
# on: [push, pull_request]
47+
# jobs:
48+
# lua-lint:
49+
# runs-on: ubuntu-latest
50+
# steps:
51+
# - name: Checkout
52+
# uses: actions/checkout@v4
53+
# - name: Luacheck linter
54+
# uses: lunarmodules/luacheck@v1

Diff for: .github/workflows/lintPR.yaml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Lint-PR
2+
3+
on:
4+
pull_request_target:
5+
types: ['opened', 'edited', 'reopened', 'synchronize']
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
10+
11+
jobs:
12+
lua-check:
13+
name: Lua Check
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
issues: read
18+
checks: write
19+
pull-requests: write
20+
if: (github.actor != 'dependabot[bot]')
21+
22+
steps:
23+
- name: Checkout source code
24+
uses: actions/checkout@v4
25+
with:
26+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
27+
28+
# Optional step to run on only changed files
29+
- name: Get changed files
30+
id: changed-files
31+
uses: tj-actions/changed-files@v44
32+
with:
33+
since_last_remote_commit: true
34+
files: |
35+
**.lua
36+
37+
- name: List changed files
38+
run: |
39+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
40+
echo "$file was changed"
41+
done
42+
43+
# - name: Lua Check
44+
# if: steps.changed-files.outputs.any_changed == 'true'
45+
# uses: Kong/public-shared-actions/code-check-actions/lua-lint@main
46+
# with:
47+
# # additional_args: '--no-default-config --config .luacheckrc'
48+
# files: ${{ steps.changed-files.outputs.all_changed_files }}
49+
50+
- name: Run Luacheck for static analysis
51+
if: steps.changed-files.outputs.any_changed == 'true'
52+
uses: lunarmodules/luacheck@ababb6d403d634eb74d2c541035e9ede966e710d
53+
continue-on-error: true
54+
with:
55+
args: "--codes --ranges --formatter JUnit -q ${{ steps.changed-files.outputs.all_changed_files }} > luacheck_${{github.sha}}.xml"
56+
57+
- name: Upload results to workflow
58+
if: always()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: luacheck_results.zip
62+
path: |
63+
luacheck_${{github.sha}}.xml
64+
if-no-files-found: warn
65+
66+
# - name: Print Luacheck results
67+
# shell: bash
68+
# run: |
69+
# cat luacheck_${{github.sha}}.xml
70+
71+
# when using the regular GITHUB_TOKEN, the check-run created by this step will be assigned to a
72+
# random workflow in the GH UI. to prevent this, we can force the check-run to be created in a separate
73+
# check-suite, which is created automatically if we use the credentials of a GitHub App
74+
# Ref: https://github.com/EnricoMi/publish-unit-test-result-action/issues/181
75+
# Publishing: https://github.com/EnricoMi/publish-unit-test-result-action#publishing-test-results
76+
- name: Luacheck Report
77+
uses: EnricoMi/publish-unit-test-result-action@v2
78+
if: always() && github.actor != 'dependabot[bot]'
79+
with:
80+
files: |
81+
luacheck_${{github.sha}}.xml
82+
check_name: Luacheck Report
83+
comment_mode: always
84+
action_fail: true
85+
86+
# name: Luacheck
87+
# on: [push, pull_request]
88+
# jobs:
89+
# lua-lint:
90+
# runs-on: ubuntu-latest
91+
# steps:
92+
# - name: Checkout
93+
# uses: actions/checkout@v4
94+
# - name: Luacheck linter
95+
# uses: lunarmodules/luacheck@v1

Diff for: .github/workflows/update_readme.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16-
- uses: actions/setup-python@v4
16+
- uses: actions/setup-python@v5
1717
id: python3
1818
with:
1919
python-version: '3.10'

0 commit comments

Comments
 (0)