fix(action): build payload with jq and document that swarm mode deploys the tag #17

Open
shcizo wants to merge 1 commits from fix/action-safe-payload into main
Owner

The action interpolated image and tag straight into the JSON string, so a quote in either broke the payload. It is now built with jq --arg. Also replaces the GNU-only head -n -1 so the action runs on BSD/macOS runners, and documents that swarm mode sets the service image to the tag (omitting it deploys :latest).

Verified locally against a mock server: a tag containing a quote is escaped correctly, HTTP 200 exits 0 and HTTP 500 exits 1.

The action interpolated image and tag straight into the JSON string, so a quote in either broke the payload. It is now built with jq --arg. Also replaces the GNU-only head -n -1 so the action runs on BSD/macOS runners, and documents that swarm mode sets the service image to the tag (omitting it deploys :latest). Verified locally against a mock server: a tag containing a quote is escaped correctly, HTTP 200 exits 0 and HTTP 500 exits 1.
shcizo added 1 commit 2026-10-12 12:17:03 +00:00
Interpolating inputs straight into the JSON string let a quote in image or
tag break the payload. Also replaces GNU-only head -n -1 so the action runs
on BSD/macOS runners.
This pull request has changes conflicting with the target branch.
  • CLAUDE.md
  • gitea-action/README.md
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/action-safe-payload:fix/action-safe-payload
git checkout fix/action-safe-payload
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shcizo/package-updater#17