From a41109372448c65e7de675f03709a5531a134e69 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Wed, 20 Jul 2022 15:06:02 +0800 Subject: [PATCH] =?UTF-8?q?[TicketNo:]=20[Description:]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8F=82=E6=95=B0=E4=B8=8A=E4=B8=8B=E6=96=87=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-a31677dce8a5871267d8b9ef1edd9e252d810678 --- .github/workflows/deploy-cci-demo.yml | 11 +++++++---- README.md | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-cci-demo.yml b/.github/workflows/deploy-cci-demo.yml index b3d9b1d..671ebfc 100644 --- a/.github/workflows/deploy-cci-demo.yml +++ b/.github/workflows/deploy-cci-demo.yml @@ -14,6 +14,8 @@ env: jobs: build: runs-on: ubuntu-latest + outputs: + image: ${{ steps.build-image.outputs.image }} steps: - uses: actions/checkout@v2 @@ -41,6 +43,7 @@ jobs: echo "::set-output name=image::$SWR_REGISTRY/$SWR_ORGANIZATION/$IMAGE_NAME:$IMAGE_TAG" deploy: + needs: build runs-on: ubuntu-latest steps: - name: Authenticate to Huawei Cloud @@ -57,20 +60,20 @@ jobs: # 通过镜像新建或者更新负载 - name: Deploy to CCI - uses: huaweicloud/deploy-cci-action@v1.0.3 + uses: huaweicloud/deploy-cci-action@v1.1.0 id: deploy-to-cci with: namespace: action-namespace-name deployment: action-deployment-name - image: ${{ steps.build-image.outputs.image }} + image: ${{ needs.build.outputs.image }} # 通过yaml新建或者更新负载,yaml文件可以根据自己的需求修改pod数量,容器的端口,cpu, 内存 # - name: Deploy to CCI - # uses: huaweicloud/deploy-cci-action@v1.0.3 + # uses: huaweicloud/deploy-cci-action@v1.1.0 # id: deploy-to-cci # with: # namespace: action-namespace-name # deployment: action-deployment-name # manifest: './deployment.yaml' - # image: ${{ steps.build-image.outputs.image }} \ No newline at end of file + # image: ${{ needs.build.outputs.image }} \ No newline at end of file diff --git a/README.md b/README.md index 470d2a6..10f0adf 100644 --- a/README.md +++ b/README.md @@ -116,23 +116,23 @@ CCI部署有如下场景: #### 部署镜像到CCI场景一:通过简单参数直接创建或者更新负载 ```yaml - name: Deploy to CCI - uses: huaweicloud/deploy-cci-action@v1.0.3 + uses: huaweicloud/deploy-cci-action@v1.1.0 id: deploy-to-cci with: namespace: action-namespace-name deployment: action-deployment-name - image: ${{ steps.build-image.outputs.image }} + image: ${{ needs.build.outputs.image }} ``` #### 部署镜像到CCI场景二:根据提供的yaml文件创建或者更新负载 1) action 内容 ```yaml - name: Deploy to CCI - uses: huaweicloud/deploy-cci-action@v1.0.3 + uses: huaweicloud/deploy-cci-action@v1.1.0 id: deploy-to-cci with: namespace: action-namespace-name deployment: action-deployment-name - image: ${{ steps.build-image.outputs.image }} + image: ${{ needs.build.outputs.image }} manifest: ./deployment.yml ``` -- Gitee