Skip to content

Commit

Permalink
Build and publish both images as well as miner binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Oct 23, 2024
1 parent e4631d0 commit 8ca88e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.run
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 8ca88e5

Please sign in to comment.