Skip to content

Commit f90ad6d

Browse files
committed
feat(lua): use external luarocks spec file
1 parent 64f7fd7 commit f90ad6d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/luarocks-check-versions.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88

99
permissions: {}
1010

11+
defaults:
12+
run:
13+
working-directory: openid-connect-provider-debugger
14+
1115
jobs:
1216
luarocks-check-versions:
1317
runs-on: ubuntu-latest
@@ -17,4 +21,13 @@ jobs:
1721
run: |
1822
set -euo pipefail
1923
IFS=$'\n\t'
20-
docker run --pull always -t --user root --entrypoint /bin/sh "leplusorg/${GITHUB_REPOSITORY#*/}:main" -c 'if luarocks list --outdated | tee -a /dev/stderr | grep -q -e " < "; then exit 1; fi'
24+
rc=0
25+
\sudo apt install -y luarocks
26+
\lua -e 'dofile("/tmp/openid-connect-provider-debugger-0.0.0.rockspec"); for _, dep in ipairs(dependencies) do local package, version = dep:match("^(.+)%s*==%s*(.+)$"); if package and version then print(package .. " " .. version) end end' | while read package current_version ; do
27+
latest_version="$(\luarocks search "${package}" --porcelain | \head -n 1 | \cut -f 2)"
28+
if [ "${current_version}" != "${latest_version}" ]; then
29+
echo "${package} ${current_version} -> ${latest_version}"
30+
rc=$((rc+1))
31+
fi
32+
done
33+
exit ${rc}

0 commit comments

Comments
 (0)