Skip to content

Commit

Permalink
add docker build push to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonfleas committed Feb 27, 2024
1 parent f8dc7c5 commit 79f39cb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 79f39cb

Please sign in to comment.