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 }}