From 99188a9ee48118fb7294ed3bb7f996aece3e0aa0 Mon Sep 17 00:00:00 2001 From: Paper-Dragon <2678885646@qq.com> Date: Wed, 21 Feb 2024 08:12:25 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B9=B6=E5=8F=91=E6=9E=84=E5=BB=BA=E5=AE=B9?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-cpu-docker-worker.yml | 33 +++++++++++++++++++ ...ipline.yml => build-gpu-docker-worker.yml} | 10 +----- 2 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-cpu-docker-worker.yml rename .github/workflows/{pipline.yml => build-gpu-docker-worker.yml} (73%) diff --git a/.github/workflows/build-cpu-docker-worker.yml b/.github/workflows/build-cpu-docker-worker.yml new file mode 100644 index 0000000..0b8b62c --- /dev/null +++ b/.github/workflows/build-cpu-docker-worker.yml @@ -0,0 +1,33 @@ +name: 构建cpu容器 + +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 \ No newline at end of file diff --git a/.github/workflows/pipline.yml b/.github/workflows/build-gpu-docker-worker.yml similarity index 73% rename from .github/workflows/pipline.yml rename to .github/workflows/build-gpu-docker-worker.yml index 1cf81b8..9aa3d98 100644 --- a/.github/workflows/pipline.yml +++ b/.github/workflows/build-gpu-docker-worker.yml @@ -1,4 +1,4 @@ -name: 构建容器 +name: 构建gpu容器 on: push: @@ -31,11 +31,3 @@ jobs: 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