From 8f003a09c7fc538f05ddcd7ba189752b810c1cbb Mon Sep 17 00:00:00 2001 From: Nico640 Date: Thu, 21 May 2020 21:14:01 +0200 Subject: [PATCH] cache builds --- .github/workflows/docker-legacy.yml | 7 ++++++- .github/workflows/docker-release.yml | 7 ++++++- .github/workflows/docker-tag.yml | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-legacy.yml b/.github/workflows/docker-legacy.yml index 9c8a4c7..ad6cd5f 100644 --- a/.github/workflows/docker-legacy.yml +++ b/.github/workflows/docker-legacy.yml @@ -17,4 +17,9 @@ jobs: run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - name: Build and push Docker image - run: docker buildx build --platform linux/arm -t nico640/docker-unms:armhf -f Dockerfile --push . + run: | + docker buildx build \ + --platform linux/arm \ + -t nico640/docker-unms:armhf -f Dockerfile \ + --push --cache-from type=local,src=/tmp/buildx-cache \ + --cache-to type=local,dest=/tmp/buildx-cache . diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index dd486f3..fde203e 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -16,4 +16,9 @@ jobs: run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - name: Build and push Docker image - run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/docker-unms:latest -f Dockerfile --push . + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64,linux/arm/v7 \ + -t nico640/docker-unms:latest -f Dockerfile \ + --push --cache-from type=local,src=/tmp/buildx-cache \ + --cache-to type=local,dest=/tmp/buildx-cache . diff --git a/.github/workflows/docker-tag.yml b/.github/workflows/docker-tag.yml index e2a54a7..9f631a0 100644 --- a/.github/workflows/docker-tag.yml +++ b/.github/workflows/docker-tag.yml @@ -20,4 +20,9 @@ jobs: run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - name: Build and push Docker image - run: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nico640/docker-unms:$RELEASE_VERSION -f Dockerfile --push . + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64,linux/arm/v7 \ + -t nico640/docker-unms:$RELEASE_VERSION -f Dockerfile \ + --push --cache-from type=local,src=/tmp/buildx-cache \ + --cache-to type=local,dest=/tmp/buildx-cache .