Skip to content

Fix and harden the LuaRocks publish pipeline - #36

Merged
whiteh merged 5 commits into
masterfrom
fix-publish-action
Jul 31, 2026
Merged

Fix and harden the LuaRocks publish pipeline#36
whiteh merged 5 commits into
masterfrom
fix-publish-action

Conversation

@whiteh

@whiteh whiteh commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fix and harden the LuaRocks publish pipeline

Fixes the publish-luarocks workflow, which failed on first real use, and adds guardrails to stop bad rockspecs reaching master.

Changes

  • Install luarocks in the publish workflow — the OpenResty apt package doesn't ship it, only the Docker image builds one in image; lint/make/upload all need it on PATH.
  • Install dkjson for luarocks itself — luarocks upload needs a JSON library available to its own Lua environment, separate from the project's lua-cjson runtime dependency (which only lands in the throwaway test tree).
  • Add check_rockspec_version.sh, wired into the PR/push build workflow, which fails the build if:
    • the rockspec filename and its internal version = "..." field disagree, or
    • the corresponding vX.Y.Z git tag already exists (catches an unbumped version before merge, not after release).
  • Loosen the rockspec COPY in Dockerfile and Dockerfile.nginx_lua to *.rockspec instead of a hardcoded filename, so bumping the version no longer requires touching either Dockerfile. Updated CONTRIBUTING.md to drop that now-unnecessary step.

Testing

  • Verified end-to-end against a real tag: publish_to_luarocks.sh successfully lints, pins the source tag, and uploads to luarocks.org.
  • Verified check_rockspec_version.sh correctly rejects an already-tagged version (tested against v1.6.2, then cleaned up).

@whiteh
whiteh requested a review from a team as a code owner July 30, 2026 14:55
@whiteh whiteh changed the title Add in luarocks installation Fix and harden the LuaRocks publish pipeline Jul 30, 2026
@whiteh
whiteh merged commit 5de30ef into master Jul 31, 2026
3 of 4 checks passed
@whiteh
whiteh deleted the fix-publish-action branch July 31, 2026 07:59
@whiteh
whiteh restored the fix-publish-action branch July 31, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants