Commit cfe650a
committed
github/workflows: Use buildx to build images for multiple platforms
docker buildx is able to create multi-platform docker images in a single
invocation (using emulation where required), but multi-platform images
cannot be stored locally, only pushed directly to a regsitry. So refacor
the workflow a little.
Set common configuration as environment variables.
Add actions to initialize QEMU and buildx.
The remaining steps are modified to:
* First build just the amd64 image and use this for validation using
docker-compose (--load only supports single-platform images)
* Build, tag and push the "latest" images for all platforms in a
single invocation
* For tags, override IMAGE_TAG and run the same command again.
Built layers are cached so no redundant work is performed, despite
running the same command multiple times.
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>1 parent 21ce832 commit cfe650a
1 file changed
Lines changed: 19 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
19 | 30 | | |
20 | 31 | | |
21 | 32 | | |
22 | 33 | | |
23 | 34 | | |
24 | | - | |
| 35 | + | |
25 | 36 | | |
26 | | - | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
0 commit comments