diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index eb5f80c..fc8de30 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -79,17 +79,6 @@ jobs: run: | sudo mv output/quai-gpu-miner.tar.gz output/quai-gpu-miner-${{ github.event.inputs.tag_version }}.tar.gz - # Build the dockerfile.run image (no push) - - name: Build the dockerfile.run image - uses: docker/build-push-action@v5 - with: - context: . - file: 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/.github/workflows/build-runtime.yml b/.github/workflows/build-runtime.yml new file mode 100644 index 0000000..ed68bd9 --- /dev/null +++ b/.github/workflows/build-runtime.yml @@ -0,0 +1,60 @@ +name: Build Runtime Image + +on: + workflow_dispatch: + inputs: + tag_version: + description: 'Tag version for the runtime image (e.g., v1.0.0)' + required: true + branch: + description: 'Branch to build from (e.g., main, develop)' + default: 'main' + required: true + +jobs: + build-runtime: + name: Build Runtime + runs-on: ubuntu-20.04 + steps: + - name: Set up SSH key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.GH_PAT }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan github.com >> ~/.ssh/known_hosts + echo -e "Host github.com\n IdentityFile ~/.ssh/id_rsa\n StrictHostKeyChecking no" > ~/.ssh/config + chmod 644 ~/.ssh/config + + - name: Set Git user configuration + run: | + git config --global user.name "ci-dominantstrategies" + git config --global user.email "ci@dominantstrategies.io" + + - name: Checkout Repository + uses: actions/checkout@v3 + with: + ssh-key: ${{ secrets.GH_PAT }} + fetch-depth: 0 + ref: ${{ github.event.inputs.branch }} + + # Set up Docker Buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # Log in to DockerHub (or other registry if needed) + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: quaibuild + password: ${{ secrets.DOCKER }} + + # Build the dockerfile.run image (no push) + - name: Build the dockerfile.run image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.run + push: false + tags: | + quainetwork/quai-gpu-miner-run:${{ github.event.inputs.tag_version }} + quainetwork/quai-gpu-miner-run:latest