From c19308577afa6d713abf3718a064f97a9f0adf00 Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 29 May 2026 15:13:12 +0200 Subject: [PATCH] add caching and use docker action to build and publish --- .github/workflows/production.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 119747d..6929f78 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -21,10 +21,19 @@ jobs: - name: Login to Github Container Registry run: echo "${{ secrets.GHCR_SECRET }}" | docker login ghcr.io -u ${{ env.GH_USER }} --password-stdin - - name: Build image and publish - run: | - docker build . -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # - name: Build image and publish + # run: | + # docker build . -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build image and publish with Cache + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + cache-from: type=gha + cache-to: type=gha,mode=max deploy: needs: publish