Commit d074fee
ci: fix Docker GHA caching and add merge_group trigger (#1101)
## Summary
Docker GHA caching (`type=gha`) was already in both CI workflows, but
three issues made it less effective than it should be.
## Changes
### `PR-Build-And-Test.yml`
**Add `merge_group` trigger**
Docker validation and tests were not running in the GitHub merge queue,
meaning a merge could pass without a final Docker build check. Adding
`merge_group:` ensures the same validation that runs on PRs also runs
before merge.
**Replace tar export with `push: false`**
The Docker step was exporting the image to a `.tar` file (`outputs:
type=docker,dest=...`) but that file was never uploaded as an artifact
and never used by any downstream job. Exporting to a tar forces BuildKit
to fully extract all image layers to disk — adding unnecessary time and
disk I/O. Replacing it with `push: false` skips the extraction while
still writing all layers to the GHA cache.
### `Build-Test-And-Deploy.yml`
**Remove dead "Docker build (no push)" step**
The step had this condition:
```yaml
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
```
But this workflow only triggers on `push: branches: [main]` and
`workflow_dispatch` — so that condition can never be true. The step was
dead code. PR and merge_group Docker validation is now correctly owned
by `PR-Build-And-Test.yml` (via the `merge_group` trigger added above).
## Before / After
| Workflow | Before | After |
|---|---|---|
| PR Docker build | Exports unused tar, no merge queue coverage | `push:
false`, runs on merge queue too |
| Main Docker build | Has unreachable dead step | Dead step removed;
caching unchanged |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c23d291 commit d074fee
2 files changed
Lines changed: 2 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 66 | | |
78 | 67 | | |
79 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
0 commit comments