From eea17918025fefbe7712b2c8d7adf717f3b1e5f1 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Fri, 17 May 2024 22:44:23 -0600 Subject: [PATCH] add prod image in ci --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 569240c..8e25d02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,3 +30,20 @@ jobs: with: image: teufa:ci run: pytest + - name: docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: build prod image + uses: docker/build-push-action@v5 + if: github.ref == 'refs/heads/main' + with: + context: . + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + target: prod + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + push: false