This commit is contained in:
hyh 2024-02-21 16:02:40 +08:00
commit 31b4c9e82a
2 changed files with 43 additions and 2 deletions

41
.github/workflows/pipline.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: 构建容器
on:
push:
branches:
# 确保这是你正在使用的分支名称
- main
permissions:
contents: write
jobs:
publish-docker:
runs-on: ubuntu-latest
steps:
- name: 拉源码
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: 登陆到DockerHub
uses: docker/login-action@v2
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 构建和推送qubic-CPU镜像
uses: docker/build-push-action@v4.1.1
with:
context: .
file: ./gpu-dockerfile
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/qubic-CPU:latest
- name: 构建和推送qubic-GPU镜像
uses: docker/build-push-action@v4.1.1
with:
context: .
file: ./cpu-dockerfile
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/qubic-GPU:latest

View File

@ -33,12 +33,12 @@ sudo reboot
运行挖矿程序
```
```bash
docker run -itd --name qubic-cpu --restart=always \
-e name=矿机名称 \
-e token="钱包地址" \
-e num=使用线程数 \
qubic-GPU:latest
qubic-CPU:latest
```
## GPU 挖矿