From a0abcb9a678a95a21aa494491bce00f10df7c647 Mon Sep 17 00:00:00 2001 From: Anders Sparrevohn Date: Tue, 9 Aug 2022 12:54:35 +0200 Subject: [PATCH] Use docker build-push action and cache --- .github/workflows/docker-image.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f117b1045..572c4e8cf 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -20,14 +20,18 @@ jobs: id: buildx uses: docker/setup-buildx-action@v2 - - name: Login to docker hub + - name: Login to DockerHub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build the image - run: | - docker buildx build --push \ - --tag grobut939/ghostfolio:latest \ - --platform linux/amd64,linux/arm64 . + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: grobut939/ghostfolio:latest + cache-from: type=gha + cache-to: type=gha,mode=max