From 0318ae89e009a429c49f61435cbb5df4390a4f4c Mon Sep 17 00:00:00 2001 From: Paper-Dragon <2678885646@qq.com> Date: Wed, 21 Feb 2024 07:46:11 +0000 Subject: [PATCH 1/2] add pipline --- .github/workflows/pipline.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pipline.yml diff --git a/.github/workflows/pipline.yml b/.github/workflows/pipline.yml new file mode 100644 index 0000000..f09823c --- /dev/null +++ b/.github/workflows/pipline.yml @@ -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 From 2db11b819e59731506e94644144a4ab55f9d587a Mon Sep 17 00:00:00 2001 From: Paper-Dragon <2678885646@qq.com> Date: Wed, 21 Feb 2024 07:58:47 +0000 Subject: [PATCH 2/2] fixed char bug --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3f609e..2902452 100644 --- a/README.md +++ b/README.md @@ -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 挖矿