Commit 1dd1cd8
authored
Publish release images by dispatch, built from the tag (#823)
Publishing the 9.7.0 GitHub Release produced no workflow run at all - not a failed
one, nothing - and the images were never pushed.
GitHub runs a release event's workflow as it exists at the tag, not as it exists on
the default branch. The v9.7.0 tag was cut on 12 Aug and the release trigger landed
on main the next day, so GitHub read the tag's copy of publish-docker.yaml, found
no release trigger, and correctly did nothing.
That is not a one-off. The tag is cut at `prepare` and the Release is published at
`vote-passed`, at least 72 hours later, so anything changed in this workflow inside
that window silently does not apply to the release in flight. The window reopens
every release; 9.7.0 was just the first time something landed in it.
Drop the release trigger and dispatch instead. `github-release` creates the Release
and then runs `gh workflow run publish-docker.yaml -f version=x.y.z`, so publishing
stays automatic rather than becoming something to remember, and there is one path
rather than two that could both fire. A dispatch always runs the workflow from the
default branch, which makes what publishes a function of main rather than of when
the tag happened to be cut. If the dispatch fails the Release is already out, so
the script warns with the retry commands instead of aborting.
Everything the run acts on still comes from the tag rather than from a branch or a
timestamp. The tree is checked out at refs/tags/vx.y.z, so Dockerfile and Makefile
- which decide what the image actually is - come from the released source instead
of from whatever main looks like now; without that a dispatch would have built with
main's copies. The agent package remains the sha512- and signature-verified tarball
from dist/release, and the image tags come from the version. A leading v on the
input is tolerated, and leaving it blank builds a development image exactly as a
push to main does.1 parent fc00d4f commit 1dd1cd8
3 files changed
Lines changed: 83 additions & 27 deletions
File tree
- .github/workflows
- docs/en/contribution
- tools/releasing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
37 | 48 | | |
38 | 49 | | |
39 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
| |||
56 | 70 | | |
57 | 71 | | |
58 | 72 | | |
59 | | - | |
| 73 | + | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
66 | | - | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
71 | | - | |
| 85 | + | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
| |||
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
82 | | - | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | | - | |
86 | | - | |
| 99 | + | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
| |||
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
123 | | - | |
| 136 | + | |
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
127 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
128 | 155 | | |
129 | 156 | | |
130 | 157 | | |
131 | 158 | | |
132 | 159 | | |
133 | 160 | | |
134 | | - | |
| 161 | + | |
135 | 162 | | |
136 | 163 | | |
137 | 164 | | |
| |||
149 | 176 | | |
150 | 177 | | |
151 | 178 | | |
152 | | - | |
153 | | - | |
| 179 | + | |
154 | 180 | | |
155 | 181 | | |
156 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
145 | 160 | | |
146 | 161 | | |
147 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
693 | 692 | | |
694 | | - | |
695 | | - | |
696 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
697 | 712 | | |
698 | 713 | | |
699 | 714 | | |
| |||
0 commit comments