coreapp login <host>/<owner> saves a token used for that owner's repositories and images before the host's token, so apps from different accounts on one host can use different tokens. git sends it only under https://<host>/<owner>/; docker gets it for that pull only. Errors name the token that was tried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.8 KiB
2.8 KiB
Publishing a release, and installing it from its repository
Read this only when the user asks for a release, or to install an app from its repository. Publishing pushes to the user's registry and tags their repository, so don't do it on your own.
Publishing
A published app is a tagged commit in its repository plus its image in a registry, from which any Core can install it.
- Set
imageincoreapp.tomlto 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 publishsuggests one from the git remote.coreapp deploykeeps working with that name. - Raise
versionif this version was published before (published versions are never replaced). - Commit everything;
coreapp publishrefuses uncommitted changes. coreapp publishbuilds the image for linux/amd64 (add--platform linux/amd64,linux/arm64for ARM Cores too), pushesimage:version, and tags the commitv<version>. It needsdocker login <registry>first; that's the user's to do (for Gitea, with a token that has thewrite:packagescope).- 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 from the repository
To check a release the way a Core's owner will get it:
coreapp install https://<gitea-host>/<owner>/<repo>installs it on the Core in the VM from the repository (the newestv*tag;@v1.2.0for another), pulling the published image.coreapp update <name>moves it to a newer release.- The Core reads only
coreapp.tomlandicon.pngfrom the repository;versionhas to match the tag. - Coreapps are often private: for a private repository and image, the Core
needs a token for the host first,
coreapp login <gitea-host>, which asks for a user name and a read-only token (repositories and packages); or for one owner there,coreapp login <gitea-host>/<owner>, when that owner's apps need another account's token. That's the user's to enter, not yours. - On the same Core,
coreapp deployfrom the folder andcoreapp installfrom the repository update the same app (same name, data and database). - A Core keeps running the image it installed, by digest: a release can't be fixed by pushing its tag again (installing it again is refused), so publish a new version.
- Going back to an older release needs
coreapp install --downgrade <url>@v<old>; the user decides that, since the older version may not understand the newer one's data.