Browse Source
Add cache(?) to arm docker build (#2337)
* Add cache(?) to arm docker build
* Update ci.yml
pull/2339/head
syeopite
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
15 additions and
0 deletions
-
.github/workflows/ci.yml
|
|
|
@ -106,14 +106,29 @@ jobs: |
|
|
|
- name: Set up Docker Buildx |
|
|
|
uses: docker/setup-buildx-action@v1 |
|
|
|
|
|
|
|
- name: Cache Docker layers |
|
|
|
uses: actions/cache@v2 |
|
|
|
with: |
|
|
|
path: /tmp/.buildx-cache |
|
|
|
key: ${{ runner.os }}-multi-buildx-${{ github.sha }} |
|
|
|
restore-keys: | |
|
|
|
${{ runner.os }}-multi-buildx |
|
|
|
|
|
|
|
- name: Build Docker ARM64 image |
|
|
|
uses: docker/build-push-action@v2 |
|
|
|
with: |
|
|
|
context: . |
|
|
|
file: docker/Dockerfile.arm64 |
|
|
|
platforms: linux/arm64/v8 |
|
|
|
cache-from: type=local,src=/tmp/.buildx-cache |
|
|
|
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new |
|
|
|
|
|
|
|
- name: Test Docker |
|
|
|
run: while curl -Isf http://localhost:3000; do sleep 1; done |
|
|
|
|
|
|
|
- name: Override old Docker cache |
|
|
|
run: | |
|
|
|
rm -rf /tmp/.buildx-cache |
|
|
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
|
|
|
|
|
|
|
|