Skip to content

Commit

Permalink
Split build and run into separate actions due to actions limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Oct 24, 2024
1 parent ee2bd6a commit 74368bd
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/build-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 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 "[email protected]"
- 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: true
tags: |
quainetwork/quai-gpu-miner-run:${{ github.event.inputs.tag_version }}
quainetwork/quai-gpu-miner-run:latest

0 comments on commit 74368bd

Please sign in to comment.