Skip to content

Commit

Permalink
tools: use cache to speed up builds
Browse files Browse the repository at this point in the history
  • Loading branch information
goenning committed May 9, 2022
1 parent 6c0f2be commit a182241
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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' }}
Expand All @@ -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

0 comments on commit a182241

Please sign in to comment.