feat: initial composite action for package-updater /update
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# package-updater-action
|
||||
|
||||
Reusable Gitea composite action that notifies a running `package-updater` service
|
||||
to `docker compose pull` + `up -d` for the matching service(s) on its host.
|
||||
|
||||
Companion to https://gitea.shcizo.se/shcizo/package-updater.
|
||||
|
||||
## Usage
|
||||
|
||||
In a consumer repo's `.gitea/workflows/deploy.yml`:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-and-push]
|
||||
steps:
|
||||
- uses: shcizo/package-updater-action@v1
|
||||
with:
|
||||
endpoint: https://updater.example.com/update
|
||||
image: gitea.shcizo.se/shcizo/${{ gitea.repository_owner }}/myapp
|
||||
tag: ${{ gitea.sha }}
|
||||
token: ${{ secrets.UPDATER_TOKEN }}
|
||||
```
|
||||
|
||||
`UPDATER_TOKEN` should be an organisation-level secret in Gitea so all repos share it.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Required | Default | Description |
|
||||
|---|---|---|---|
|
||||
| `endpoint` | yes | — | Full URL to `package-updater`'s `/update` |
|
||||
| `image` | yes | — | Image reference without tag |
|
||||
| `tag` | no | `""` | Tag that was just pushed (logged for audit) |
|
||||
| `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.
|
||||
|
||||
## Versioning
|
||||
|
||||
Pin to a major version: `shcizo/package-updater-action@v1`. Breaking changes will
|
||||
bump major; new inputs and bug fixes will reuse `v1`.
|
||||
Reference in New Issue
Block a user