Commit e4114f9
Fix workflow GHCR permissions issue (#28)
* Add automated Docker image publishing to Docker Hub and GHCR
Enhanced the Docker build workflow to automatically build and push images to both Docker Hub and GitHub Container Registry on pushes to main branch.
Changes:
- Added Docker Hub and GHCR authentication steps
- Configured multi-registry image tagging (latest, branch, SHA)
- Updated health and API endpoint tests to use published images
- Added required permissions for GHCR package publishing
Required secrets: DOCKERHUB_USERNAME, DOCKERHUB_TOKEN
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix workflow to skip push operations on pull requests
The workflow was failing because it attempted to push to GHCR during PR builds, which don't have write permissions. This fix ensures that push operations only occur on direct pushes to main.
Changes:
- Added conditional checks to skip Docker registry login on PRs
- Set push parameter to false for PRs (build-only mode)
- Skip test steps on PRs since images aren't pushed to registry
- Maintains full build validation on PRs without requiring write access
This allows PRs to validate builds while only pushing images when merging to main.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2dac897 commit e4114f9
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
0 commit comments