From 8ca88e50bc58556497f61fa894cc43719e812470 Mon Sep 17 00:00:00 2001 From: Hussam Date: Wed, 23 Oct 2024 17:21:10 -0500 Subject: [PATCH] Build and publish both images as well as miner binary --- .github/workflows/build-release.yml | 25 ++++++++++++++++++------- Dockerfile.run | 2 +- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index f60e475..5039754 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -59,25 +59,36 @@ jobs: username: quaibuild password: ${{ secrets.DOCKER }} - # Build and push the Docker image - - name: Build and push + # Build and push the dockerfile.build image + - name: Build and push dockerfile.build uses: docker/build-push-action@v5 with: context: . + dockerfile: dockerfile.build push: true tags: | - quainetwork/quai-gpu-miner:${{ github.event.inputs.tag_version }} - quainetwork/quai-gpu-miner:latest + quainetwork/quai-gpu-miner-build:${{ github.event.inputs.tag_version }} + quainetwork/quai-gpu-miner-build:latest - # Run the container and build the binary - - name: Run docker container + # Run the container and build the binary using the build image + - name: Run docker container (build) run: | - docker run --rm -v "${{ github.workspace }}/output:/output" "quainetwork/quai-gpu-miner:${{ github.event.inputs.tag_version }}" + docker run --rm -v "${{ github.workspace }}/output:/output" "quainetwork/quai-gpu-miner-build:${{ github.event.inputs.tag_version }}" - name: Append version number to binary run: | sudo mv output/quai-gpu-miner.tar.gz output/quai-gpu-miner-${{ github.event.inputs.tag_version }}.tar.gz + - name: Build the dockerfile.run image (no push) + uses: docker/build-push-action@v5 + with: + context: . + dockerfile: dockerfile.run + push: false + tags: | + quainetwork/quai-gpu-miner-run:${{ github.event.inputs.tag_version }} + quainetwork/quai-gpu-miner-run:latest + - name: Create and Push Signed Tag env: TAG_VERSION: ${{ github.event.inputs.tag_version }} diff --git a/Dockerfile.run b/Dockerfile.run index a533544..159c1eb 100644 --- a/Dockerfile.run +++ b/Dockerfile.run @@ -1,5 +1,5 @@ # Use an Ubuntu image or another suitable base image -FROM quainetwork/quai-gpu-miner:v0.2.0 +FROM quainetwork/quai-gpu-miner-build:latest RUN ./deploy_miner.sh