From 79f39cb20e76b42ed886958a20eaedfb016b79c3 Mon Sep 17 00:00:00 2001 From: Devin Lauderdale Date: Tue, 27 Feb 2024 15:08:55 -0600 Subject: [PATCH] add docker build push to github actions --- .github/workflows/pr.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5b6ca4a..e2f0fd8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -27,10 +27,16 @@ jobs: id: set_image_name - name: Set up Docker - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - - name: Build Docker image - run: docker build -t ${{ steps.set_image_name.outputs.image_name }}:latest ${{ matrix.image_folder }}/. + - name: Build and push to GHA + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.image_folder }}/. + push: true + tags: synapsestudios/${{ steps.set_image_name.outputs.image_name }}:latest + cache-from: type=gha + cache-to: type=gha,mode=max - name: Check build status - run: docker run --rm ${{ steps.set_image_name.outputs.image_name }}:latest + run: docker run --rm synapsestudios/${{ steps.set_image_name.outputs.image_name }}:latest