Commit 10c6daf
authored
## Summary
Add `docker/login-action` to authenticate with GitHub Container Registry
before GoReleaser attempts to push Docker images.
## Problem
Docker push was failing with authentication error:
```
unauthorized: unauthenticated: User cannot be authenticated
with the token provided.
The push refers to repository [ghcr.io/bsubio/cli]
```
The `credentials:` in the workflow's `container:` section only
authenticates pulling the CI container image. It doesn't log Docker in
for pushing images from within the container.
## Solution
Add explicit Docker login step using `docker/login-action` before
GoReleaser runs. This authenticates Docker to push images to ghcr.io.
## Changes
- Add "Log in to GitHub Container Registry" step
- Use `docker/login-action@v3`
- Authenticate to `ghcr.io` registry
- Use `github.actor` and `GITHUB_TOKEN`
- Runs after buildx setup, before GoReleaser
## Workflow Flow
1. ✅ Set up QEMU (for ARM64 emulation)
2. ✅ Set up Docker Buildx (for multi-arch builds)
3. ✅ **Log in to GHCR** (NEW - authenticate for push)
4. ✅ Run GoReleaser (build and push images)
## Result
- GoReleaser can successfully push multi-arch Docker images to ghcr.io
- Both amd64 and arm64 images are built and pushed
- Multi-arch manifests are created
- Users can pull images: `docker pull ghcr.io/bsubio/cli:latest`
Fixes #153
1 parent c8b2662 commit 10c6daf
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
0 commit comments