From 9cbddaeedf12ebea1fb363795593b3e3c84fefdd Mon Sep 17 00:00:00 2001 From: Steven Tang Date: Thu, 2 Dec 2021 23:03:38 +1100 Subject: [PATCH] fix: anticipated docker push issue --- .github/workflows/docker.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 67569a3..38ecd15 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,33 +33,29 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v3 - with: - images: | - n1try/wakapi - ghcr.io/${{ github.repository }} - - - name: Build and push to Docker Hub + - name: Build and push uses: docker/build-push-action@v2 with: push: true tags: | - ${{ env.GIT_TAG }} - latest + n1try/wakapi:latest + n1try/wakapi:${{ env.GIT_TAG }} + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }} platforms: linux/amd64,linux/arm64 cache-from: type=registry,ref=n1try/wakapi:buildcache cache-to: type=registry,ref=n1try/wakapi:buildcache,mode=max - - name: Build and push to Docker Hub (Alpine) + - name: Build and push (Alpine) uses: docker/build-push-action@v2 with: file: Dockerfile.alpine push: true tags: | - ${{ env.GIT_TAG }}-alpine - latest-alpine + n1try/wakapi:latest-alpine + n1try/wakapi:${{ env.GIT_TAG }}-alpine + ghcr.io/${{ github.repository }}:latest-alpine + ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-alpine platforms: linux/amd64,linux/arm64 cache-from: type=registry,ref=n1try/wakapi:buildcache-alpine cache-to: type=registry,ref=n1try/wakapi:buildcache-alpine,mode=max