Files
package-updater/gitea-action/README.md
T
shcizo ee38e36bb7 fix(action): build payload with jq and document that swarm mode deploys the tag
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.
2026-10-12 08:44:27 +02:00

1.3 KiB

Deploy via package-updater (composite action)

Notifies package-updater to docker compose pull + up -d for the matching service(s) after a CI build.

Usage

In a consumer repo's .gitea/workflows/deploy.yml:

jobs:
  deploy:
    runs-on: ubuntu-latest
    needs: [build-and-push]
    steps:
      - uses: gitea.example.com/shcizo/package-updater/gitea-action@v1
        with:
          endpoint: https://updater.example.com/update
          image: registry.example.com/${{ gitea.repository }}
          tag: ${{ gitea.sha }}
          token: ${{ secrets.UPDATER_TOKEN }}

UPDATER_TOKEN should be set as an organisation-level secret in Gitea so all repos share it.

Inputs

Name Required Default Description
endpoint yes — Full URL to /update
image yes — Image reference without tag
tag no "" Tag that was just pushed. Compose mode ignores it (the compose file pins the reference); swarm mode sets the service image to it, so omitting it deploys :latest. Always pass it.
token yes — Bearer token configured in package-updater

Failure modes

The step exits non-zero if package-updater returns HTTP 4xx or 5xx. This is intentional — the workflow surfaces the deploy failure to whoever pushed.