coreapp publish, and a Gitea Actions workflow in new apps
coreapp publish builds the release image, pushes image:version to the registry named in coreapp.toml and tags the commit v<version>. It refuses local-only image names (suggesting one from the git remote), uncommitted changes, a version already published and a tag already on another commit. The existence check uses docker buildx imagetools inspect: docker manifest inspect reported "no such manifest" for an image that existed. Any error but "not found" stops the publish. New apps get .gitea/workflows/publish.yml, which does the same on a v* tag, for repositories with a runner that can use Docker (secrets REGISTRY_USER and REGISTRY_TOKEN). Untested: needs a runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -270,6 +270,35 @@ The installer's own log (the Core's install scripts) is on the Core in
|
||||
look at the end of it with `coreapp-vm ssh tail -n 40 /federated/logs/coreapps/<name>-install.log`
|
||||
only when a deploy fails in the installer itself.
|
||||
|
||||
### 5. Publishing (when the user asks for a release)
|
||||
|
||||
A published app is a tagged commit in its repository plus its image in a
|
||||
registry, from which any Core can install it. Only publish when the user
|
||||
asks: it pushes to their registry and tags their repository.
|
||||
|
||||
1. Set `image` in `coreapp.toml` to the registry: for an app on a Gitea
|
||||
server, `<gitea-host>/<owner>/<repo>` in lowercase (Gitea's container
|
||||
registry is on the same host). `coreapp publish` suggests one from the
|
||||
git remote. `coreapp deploy` keeps working with that name.
|
||||
2. Raise `version` if this version was published before (published
|
||||
versions are never replaced).
|
||||
3. Commit everything; `coreapp publish` refuses uncommitted changes.
|
||||
4. `coreapp publish` builds the image for linux/amd64 (add
|
||||
`--platform linux/amd64,linux/arm64` for ARM Cores too), pushes
|
||||
`image:version`, and tags the commit `v<version>`. It needs
|
||||
`docker login <registry>` first; that's the user's to do (for Gitea,
|
||||
with a token that has the `write:package` scope).
|
||||
5. The user pushes the commit and tag: `git push && git push origin v<version>`.
|
||||
|
||||
New apps also have `.gitea/workflows/publish.yml`, which does the same on
|
||||
the Gitea server when a `v*` tag is pushed, if the repository has an
|
||||
Actions runner that can use Docker and the secrets `REGISTRY_USER` and
|
||||
`REGISTRY_TOKEN`. When porting an existing app, copy it from a new app
|
||||
(`coreapp new x`) if the user wants it.
|
||||
|
||||
Installing a published app on a Core from its repository URL isn't
|
||||
available yet; for now, apps are installed with `coreapp deploy`.
|
||||
|
||||
## Reporting back
|
||||
|
||||
When you're done, tell the user:
|
||||
|
||||
Reference in New Issue
Block a user