From a18224142bf51bc6463c3d22f45f62287902e9a6 Mon Sep 17 00:00:00 2001 From: goenning Date: Mon, 9 May 2022 07:47:29 +0100 Subject: [PATCH] tools: use cache to speed up builds --- .github/workflows/publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3b31873c3..ec23225d9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,13 +22,13 @@ jobs: ref: ${{ github.event.workflow_run.head_sha }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASS }} @@ -42,6 +42,8 @@ jobs: build-args: COMMITHASH=${{ github.event.workflow_run.head_sha }} platforms: linux/amd64,linux/arm64/v8 tags: getfider/fider:PR_${{ github.event.workflow_run.pull_requests[0].number }} + cache-from: type=registry,ref=getfider/fider:buildcache + cache-to: type=registry,ref=getfider/fider:buildcache,mode=max - name: build and push docker image (push) if: ${{ github.event.workflow_run.event == 'push' }} @@ -52,3 +54,5 @@ jobs: build-args: COMMITHASH=${{ github.event.workflow_run.head_sha }} platforms: linux/amd64,linux/arm64/v8 tags: getfider/fider:SHA_${{ github.event.workflow_run.head_sha }},getfider/fider:main + cache-from: type=registry,ref=getfider/fider:buildcache + cache-to: type=registry,ref=getfider/fider:buildcache,mode=max