Commit be76942
authored
ci: don't cancel a merged PR's build when merging the next (#26)
* ci: skip arm64 emulation on PR docker builds
The workflow built linux/amd64,linux/arm64 on every PR, but arm64 runs
under QEMU emulation on the amd64 runner (a Next.js pnpm build under
emulation is very slow) and PRs never push the image. Build amd64 only
on PRs for validation and keep multi-arch on push to main.
GHA layer caching (type=gha, mode=max) was already in place; the cost
was emulation on cache miss, not missing cache.
Claude-Session: https://claude.ai/code/session_01WyN27fNj1sCLihdHERQLKh
Signed-off-by: Kevin Su <pingsutw@apache.org>
* ci: don't cancel main build runs when merging back-to-back PRs
All pushes to main shared the concurrency group '<workflow>-refs/heads/main',
so merging a second PR cancelled the first merge's in-progress build
(observed on run 29362267088). Key push runs by github.sha so each merged
PR gets its own group and runs to completion; PRs still group by number so
stale PR runs are cancelled on new commits.
Claude-Session: https://claude.ai/code/session_01WyN27fNj1sCLihdHERQLKh
Signed-off-by: Kevin Su <pingsutw@apache.org>
* ci: build both amd64 and arm64 on PRs too
Revert the PR-only amd64 build; always build both platforms for
validation.
Claude-Session: https://claude.ai/code/session_01WyN27fNj1sCLihdHERQLKh
Signed-off-by: Kevin Su <pingsutw@apache.org>
* ci: build arches on native runners instead of QEMU
The multi-arch build ran both platforms on the amd64 runner, so arm64
went through QEMU emulation. Under emulation the Next.js/SWC build hangs
for hours (runs 29862466454 and 29874051988 sat in-progress ~3h).
Build each arch on its own native runner in a matrix (ubuntu-latest +
ubuntu-24.04-arm, free for public repos), push each by digest, then merge
into one multi-arch manifest on push to main. Per-arch GHA cache scopes
avoid cross-arch cache clobbering. Keeps building both amd64 and arm64.
Claude-Session: https://claude.ai/code/session_01WyN27fNj1sCLihdHERQLKh
Signed-off-by: Kevin Su <pingsutw@apache.org>
* ci: push image on PR builds too
Push the multi-arch image on PRs, not just main. Every build pushes an
immutable ghcr tag <sha>; main also updates <latest> and PRs also get a
moving pr-<number> tag so the current PR image is easy to deploy.
Fork PRs get a read-only token and cannot push, but contributors push
branches within this repo, so that path is unaffected.
Claude-Session: https://claude.ai/code/session_01WyN27fNj1sCLihdHERQLKh
Signed-off-by: Kevin Su <pingsutw@apache.org>
---------
Signed-off-by: Kevin Su <pingsutw@apache.org>1 parent f1b27b9 commit be76942
1 file changed
Lines changed: 87 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | | - | |
17 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
18 | 36 | | |
19 | 37 | | |
20 | 38 | | |
| |||
23 | 41 | | |
24 | 42 | | |
25 | 43 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 44 | | |
30 | 45 | | |
31 | 46 | | |
| 47 | + | |
| 48 | + | |
32 | 49 | | |
33 | | - | |
34 | 50 | | |
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
39 | 55 | | |
40 | | - | |
| 56 | + | |
| 57 | + | |
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
44 | | - | |
45 | | - | |
| 61 | + | |
46 | 62 | | |
47 | 63 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 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 | + | |
| 123 | + | |
| 124 | + | |
0 commit comments