From a6fd00e3233c78effa1c4fd28fd9f5d6afa67742 Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Mon, 30 Sep 2024 03:13:02 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=94=AF=E6=8C=81=E7=89=A9=E7=90=86?= =?UTF-8?q?=E6=9C=BA=E5=88=B7=E6=96=B0=E4=B8=8B=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/miflow.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/miflow.yml b/.gitea/workflows/miflow.yml index 9695a3c..9f17a4f 100644 --- a/.gitea/workflows/miflow.yml +++ b/.gitea/workflows/miflow.yml @@ -27,6 +27,22 @@ jobs: push: true tags: micr.cloud.mioffice.cn/egg/egg_server:${{ github.sha }} + refresh-image: + runs-on: ubuntu-latest + container: catthehacker/ubuntu:act-latest + steps: + - name: Login to the server and refresh the image + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + key: ${{ secrets.SERVER_KEY }} + port: ${{ secrets.SERVER_PORT }} + script: | + docker pull micr.cloud.mioffice.cn/egg/egg_server:${{ github.sha }} + docker push micr.cloud.mioffice.cn/egg/egg_server:${{ github.sha }} + docker rmi $(docker images | grep "micr.cloud.mioffice.cn/egg/egg_server" | grep -v "${{ github.sha }}" | awk '{print $3}') + fast-deploy: runs-on: ubuntu-latest container: cr.d.xiaomi.net/bigdata-fe/matrix-cli @@ -34,4 +50,4 @@ jobs: - name: Set matrix-cli config run: matrix-cli config set --access-key ${{ secrets.MATRIX_AK }} --secret-key ${{ secrets.MATRIX_SK }} - name: Use matrix-cli to deploy - run: matrix-cli --project 462609 deploy --deploy-space 62288 --reason "${{ github.event.head_commit.message }}" --deploy-percentage 1 --tag ${{ github.sha }} + run: matrix-cli deploy --project 462609 --deploy-space egg-server-prev --reason "${{ github.event.head_commit.message }}" --deploy-percentage 1 --tag ${{ github.sha }}