Repository navigation
Commit 2b93717
committed
fix(docker): split push vs PR targets, drop redundant source
Two fixes:
1. The push and PR jobs were sharing the same bake target, so the PR
job was also exporting cache via 'cache-to = type=gha,mode=max'.
Fork PRs lack permission to write to the GHA cache, which would fail
the required build check. Split the bake file into two targets:
- synapse-website: full config including cache-to (push job)
- synapse-website-pr: same minus cache-to (PR job)
2. The workflow passed 'source: website' to bake-action plus a relative
file path 'docker-bake.hcl', but bake-action runs docker buildx from
the action's working directory (the repo root) and does not change
cwd when 'source' is set — 'source' only maps to --context. So
'docker-bake.hcl' resolved against the repo root and didn't exist.
Drop 'source' from both jobs and use the full relative path
'website/docker-bake.hcl' in 'files'. Each target now sets its own
context = 'website', so --context is still correct.
Also dropped metadata-action's bake-file output from the bake inputs;
tags and labels are already passed directly via the action's
'tags' / 'labels' inputs, so the second --file was redundant.
Verified locally:
docker buildx bake --file website/docker-bake.hcl --print synapse-website
docker buildx bake --file website/docker-bake.hcl --print synapse-website-pr
both produce the expected plans from the repo root.1 parent 9818bfa commit 2b93717
2 files changed
Lines changed: 25 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
66 | 64 | | |
67 | | - | |
68 | | - | |
| 65 | + | |
69 | 66 | | |
70 | 67 | | |
71 | 68 | | |
| |||
87 | 84 | | |
88 | 85 | | |
89 | 86 | | |
90 | | - | |
91 | 87 | | |
92 | | - | |
93 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
94 | 92 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
9 | | - | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments