Commit 87a8d20
authored
Fix Docker cache layer compatibility (#178)
* Fix Docker cache architecture mismatch in PR workflow
Add explicit single-arch platform declaration and update cache scopes
to use -amd64 suffix. This ensures PR builds can reuse cache from
release workflow's single-arch build step.
Changes:
- Add platforms: linux/amd64 to build-push-action
- Update cache-from scopes: pr-{number}-amd64, release-amd64
- Update cache-to scope: pr-{number}-amd64
This resolves the 0 CACHED steps issue where single-arch PR builds
could not reuse multi-arch release cache layers.
* Add single-arch cache build to release workflow
Add dedicated single-arch (amd64) cache build step before multi-arch
builds to enable PR workflows to reuse release cache. Both beta and
stable release jobs now use two-step pattern:
1. Build single-arch for cache (push: false)
2. Build multi-arch for publishing (push: true)
Changes:
- Add single-arch cache step to publish-prerelease job
- Add single-arch cache step to publish-release job
- Update both multi-arch steps to import from release-amd64 cache
This enables cache cross-pollination: release builds populate
release-amd64 cache, which PR builds can then reuse.
* Update pkg-pr-new workflow to use single-arch caches
Add single-arch cache fallbacks to preview builds to enable reuse
of PR and release single-arch caches. Multi-arch preview builds can
now import layers from:
1. Own preview cache (warm subsequent builds)
2. PR single-arch cache (reuse from pullrequest.yml)
3. Release single-arch cache (reuse from release.yml)
4. Release multi-arch cache (fallback)
This reduces cold cache build times for preview packages from 10+ min
to 2-3 min after first PR build completes.1 parent b0c4c97 commit 87a8d20
3 files changed
+36
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
116 | 128 | | |
117 | 129 | | |
118 | 130 | | |
| |||
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
124 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
125 | 139 | | |
126 | 140 | | |
127 | 141 | | |
| |||
170 | 184 | | |
171 | 185 | | |
172 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
173 | 199 | | |
174 | 200 | | |
175 | 201 | | |
| |||
178 | 204 | | |
179 | 205 | | |
180 | 206 | | |
181 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
182 | 210 | | |
183 | 211 | | |
184 | 212 | | |
| |||
0 commit comments