-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split build and run into separate actions due to actions limits
- Loading branch information
Showing
2 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |