From 981395c1f259dfcdbb86b1b55b4fc163dc37cf08 Mon Sep 17 00:00:00 2001 From: Devin Lauderdale Date: Tue, 27 Feb 2024 15:47:23 -0600 Subject: [PATCH] add registry service to allow docker to run --- .github/workflows/pr.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7aa0175..6c0afa3 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,6 +18,12 @@ jobs: matrix: image_folder: ${{fromJson(needs.create_matrix.outputs.matrix)}} + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: - name: Checkout code uses: actions/checkout@v2 @@ -28,14 +34,17 @@ jobs: - name: Set up Docker uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host - name: Build and push to GHA uses: docker/build-push-action@v5 with: context: ${{ matrix.image_folder }}/. - tags: ${{ steps.set_image_name.outputs.image_name }}:latest + push: true + tags: localhost:5000/${{ 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 localhost:5000/${{ steps.set_image_name.outputs.image_name }}:latest