Skip to content

Luarocks Check Versions #20

Luarocks Check Versions

Luarocks Check Versions #20

---
name: Luarocks Check Versions
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions: {}
defaults:
run:
working-directory: openid-connect-provider-debugger
jobs:
luarocks-check-versions:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 1
persist-credentials: false
- name: Check outdated dependencies
shell: bash
run: |
set -euo pipefail
IFS=$'\n\t'
rc=0
\sudo apt install -y luarocks
while IFS=' ' read -r package current_version ; do
latest_version="$(\luarocks search "${package}" --porcelain | \head -n 1 | \cut -f 2)"
if [ "${current_version}" != "${latest_version}" ]; then
echo "${package} ${current_version} -> ${latest_version}"
rc=$((rc+1))
fi
done < <(\lua -e 'dofile("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')
exit ${rc}