-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,9 @@ jobs: | |
|
||
docker: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
arch: [linux/amd64, linux/arm64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up QEMU | ||
|
@@ -59,27 +62,26 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-build-x-${{ github.sha }} | ||
key: ${{ runner.os }}-build-x-${{ matrix.arch }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-build-x- | ||
- name: Build AMD64 | ||
${{ runner.os }}-build-x-${{ matrix.arch }}- | ||
- name: Build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/amd64 | ||
platforms: ${{ matrix.arch }} | ||
push: false | ||
load: true | ||
tags: oittaa/gcp-storage-emulator:latest | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
- name: Build ARM64 | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/arm64 | ||
push: false | ||
load: false | ||
tags: oittaa/gcp-storage-emulator:latest | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache-new | ||
- | ||
# Temp fix | ||
# https://github.com/docker/build-push-action/issues/252 | ||
# https://github.com/moby/buildkit/issues/1896 | ||
name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
- name: Docker container up | ||
run: docker run -d --rm -p 8080:8080 --name gcp-storage-emulator oittaa/gcp-storage-emulator | ||
- name: Wait 10 seconds | ||
|