Skip to content

ci: added check workflow for linting rockspecs #1

ci: added check workflow for linting rockspecs

ci: added check workflow for linting rockspecs #1

Workflow file for this run

name: Check
on:
push:
branches:
- main
- 'renovate/**'
paths:
- .github/workflows/check.yml
- '**.rockspec'
pull_request:
branches:
- main
paths:
- .github/workflows/check.yml
- '**.rockspec'
workflow_dispatch:
jobs:
lint-rockspecs:
name: Lint Rockspecs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Lua
uses: leafo/[email protected]
- name: Setup LuaRocks
uses: leafo/[email protected]
- name: Run luarocks lint
run: |
shopt -s nullglob
rockspecs=(*.rockspec **/*.rockspec)
if [[ "${#rockspecs[@]}" -eq 0 ]]; then
echo "No rockspecs found"
exit 1
fi
for rockspec in "${rockspecs[@]}"; do
echo "Linting $rockspec"
luarocks lint "$rockspec"
done