mirror of
https://github.com/Chewbaccalakis/rfid-database.git
synced 2026-09-09 16:01:56 -07:00
Publish Docker image to GHCR on main builds
Add a Docker workflow that builds on PRs and pushes to ghcr.io/chewbaccalakis/rfid-database on main (latest + sha) and v* tags. Drop the redundant docker-build job from CI.
This commit is contained in:
@@ -117,10 +117,26 @@ npm run typecheck
|
||||
npm run build
|
||||
```
|
||||
|
||||
GitHub Actions runs on every pull request and push to `main`:
|
||||
GitHub Actions on every pull request and push to `main`:
|
||||
|
||||
1. **lint / typecheck / test / Next.js build**
|
||||
2. **`docker build`** — catches Dockerfile parse/build failures (the class of break that conflict markers previously caused)
|
||||
2. **Docker image** — build on PRs; on `main` (and `v*` tags) push to GHCR:
|
||||
`ghcr.io/chewbaccalakis/rfid-database`
|
||||
|
||||
### Pull the published image
|
||||
|
||||
```bash
|
||||
docker pull ghcr.io/chewbaccalakis/rfid-database:latest
|
||||
# or a specific commit: ghcr.io/chewbaccalakis/rfid-database:sha-<shortsha>
|
||||
```
|
||||
|
||||
If the package is private, authenticate first:
|
||||
|
||||
```bash
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
|
||||
```
|
||||
|
||||
Or in Compose, set `image: ghcr.io/chewbaccalakis/rfid-database:latest` and comment out `build:`.
|
||||
|
||||
## Docker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user