ci: publish Docker image to Gitea registry
This commit is contained in:
1 parent
aed2313167
commit
ef5dfc1e6b
2 files changed
+76
-11
No files matched your search
@@ -15,6 +15,26 @@ bun run build # production build into dist/
|
||||
|
||||
## Self-hosting with Docker
|
||||
|
||||
Gitea Actions builds the image on pull requests and publishes it to the Gitea
|
||||
container registry after the checks pass on `main` and `v*` tags. Published
|
||||
images are available as `gitea.lucaswinther.info/lucasw89/budget2.0:latest`,
|
||||
`:main`, `:sha-<commit>`, and `:<version>` for version tags.
|
||||
|
||||
Add a repository Actions secret named `REGISTRY_TOKEN` containing a personal
|
||||
access token with package write permission. The token must belong to the user
|
||||
who pushes the commit or tag, since the workflow logs in as the triggering
|
||||
actor. The Gitea runner must have access to a Docker daemon.
|
||||
|
||||
```bash
|
||||
docker pull gitea.lucaswinther.info/lucasw89/budget2.0:latest
|
||||
docker run --rm -p 3000:3000 gitea.lucaswinther.info/lucasw89/budget2.0:latest
|
||||
```
|
||||
|
||||
For a private package, run `docker login gitea.lucaswinther.info` first with a
|
||||
Gitea account or token that has package read permission.
|
||||
|
||||
To build locally instead:
|
||||
|
||||
```bash
|
||||
docker build -t budget2 .
|
||||
docker run --rm -p 3000:3000 budget2
|
||||
|
||||
Reference in new issue
Block a user