|
12 | 12 | - name: Checkout |
13 | 13 | uses: actions/checkout@v2 |
14 | 14 |
|
15 | | - # Setup qEMU for arm64 |
16 | | - - name: Set up QEMU |
17 | | - uses: docker/setup-qemu-action@v1 |
18 | | - with: |
19 | | - platforms: arm64 |
20 | | - |
21 | | - # We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions's cache |
22 | | - # Also buildx offers multi-arch builds |
| 15 | + # We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions' cache |
23 | 16 | - name: Set up Docker Buildx |
24 | 17 | id: buildx |
25 | 18 | uses: docker/setup-buildx-action@v1 |
|
54 | 47 | tags: rpardini/docker-registry-proxy:latest |
55 | 48 | push: true |
56 | 49 | cache-from: type=local,src=/tmp/.buildx-cache/release |
57 | | - # first run does not export the cache |
| 50 | + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release |
58 | 51 |
|
59 | 52 | - name: Build and push amd64 Debug Docker Image to DockerHub |
60 | 53 | uses: docker/build-push-action@v2 |
|
67 | 60 | tags: rpardini/docker-registry-proxy:latest-debug |
68 | 61 | push: true |
69 | 62 | cache-from: type=local,src=/tmp/.buildx-cache/debug |
70 | | - # first run does not export the cache |
71 | | - |
72 | | - # Do it all again with both archs. the amd64 will be a huge cache hit |
73 | | - # this will update the manifest have both arches |
74 | | - - name: Build and push multiarch Release Docker Image to DockerHub |
75 | | - uses: docker/build-push-action@v2 |
76 | | - with: |
77 | | - build-args: DEBUG_BUILD=0,BASE_IMAGE_SUFFIX= |
78 | | - builder: ${{ steps.buildx.outputs.name }} |
79 | | - context: . |
80 | | - file: ./Dockerfile |
81 | | - platforms: linux/arm64,linux/amd64 |
82 | | - tags: rpardini/docker-registry-proxy:latest |
83 | | - push: true |
84 | | - cache-from: type=local,src=/tmp/.buildx-cache/release |
85 | | - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release |
86 | | - |
87 | | - - name: Build and push multiarch Debug Docker Image to DockerHub |
88 | | - uses: docker/build-push-action@v2 |
89 | | - with: |
90 | | - build-args: DEBUG_BUILD=1,BASE_IMAGE_SUFFIX=-debug |
91 | | - builder: ${{ steps.buildx.outputs.name }} |
92 | | - context: . |
93 | | - file: ./Dockerfile |
94 | | - platforms: linux/arm64,linux/amd64 |
95 | | - tags: rpardini/docker-registry-proxy:latest-debug |
96 | | - push: true |
97 | | - cache-from: type=local,src=/tmp/.buildx-cache/debug |
98 | 63 | cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/debug |
99 | | - |
0 commit comments