Commit 6448160
authored
feat: Add manual workflow dispatch for Docker builds to fix GHCR access (#55)
* feat: Add manual workflow dispatch for Docker builds
Adds workflow_dispatch trigger to the publish workflow to enable
manual Docker image builds to both Docker Hub and GHCR without
requiring a new release.
This addresses issue #48 where users cannot pull from ghcr.io
because Docker images weren't built for recent releases.
Features:
- Manual trigger with tag input (e.g., v1.0.1)
- Docker-only mode to skip PyPI publishing
- Proper ref checkout for tagged versions
- Maintains backward compatibility with release events
Usage: Workflow can be manually triggered from GitHub Actions UI
to rebuild Docker images for any existing git tag.
Fixes #48
* fix: Address critical security and logic issues in workflow
Fixes all issues identified in Claude Code review:
🚨 Critical Fixes:
1. Remove redundant condition in deploy-prod job
- Was checking github.event_name == 'release' twice
- Simplified to: !inputs.docker_only
2. Fix Docker job condition logic
- Removed flawed always() + needs dependency
- Now runs independently for release or manual triggers
- Docker builds don't require PyPI deployment success
🔐 Security Improvements:
3. Add tag format validation
- Validates semver format: v1.2.3 or v1.2.3-alpha
- Prevents arbitrary git ref injection
4. Add tag existence verification
- Verifies tag exists before building
- Provides clear error messages
🔧 Best Practice Improvements:
5. Normalize tag value extraction
- Creates normalized tag output for metadata
- Handles both release and manual trigger sources
6. Remove needs dependency from docker job
- Docker builds are independent of PyPI
- Allows manual Docker-only builds without test deploy
All changes maintain backward compatibility with release events
while enabling secure manual Docker builds.1 parent 953965b commit 6448160
1 file changed
+59
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
6 | 17 | | |
7 | 18 | | |
8 | 19 | | |
| |||
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| 25 | + | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| 33 | + | |
| 34 | + | |
20 | 35 | | |
21 | 36 | | |
22 | 37 | | |
| |||
39 | 54 | | |
40 | 55 | | |
41 | 56 | | |
42 | | - | |
43 | | - | |
| 57 | + | |
| 58 | + | |
44 | 59 | | |
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
65 | 82 | | |
66 | 83 | | |
67 | 84 | | |
68 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
69 | 88 | | |
70 | 89 | | |
71 | 90 | | |
72 | | - | |
| 91 | + | |
73 | 92 | | |
74 | 93 | | |
75 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
76 | 123 | | |
77 | 124 | | |
78 | 125 | | |
| |||
84 | 131 | | |
85 | 132 | | |
86 | 133 | | |
87 | | - | |
| 134 | + | |
88 | 135 | | |
89 | 136 | | |
90 | 137 | | |
| |||
100 | 147 | | |
101 | 148 | | |
102 | 149 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
107 | 154 | | |
108 | | - | |
| 155 | + | |
109 | 156 | | |
110 | | - | |
| 157 | + | |
111 | 158 | | |
112 | 159 | | |
113 | 160 | | |
| |||
0 commit comments