ci: 支持物理机刷新下镜像
This commit is contained in:
parent
7875ab6dcf
commit
a6fd00e323
@ -27,6 +27,22 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: micr.cloud.mioffice.cn/egg/egg_server:${{ github.sha }}
|
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:
|
fast-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: cr.d.xiaomi.net/bigdata-fe/matrix-cli
|
container: cr.d.xiaomi.net/bigdata-fe/matrix-cli
|
||||||
@ -34,4 +50,4 @@ jobs:
|
|||||||
- name: Set matrix-cli config
|
- name: Set matrix-cli config
|
||||||
run: matrix-cli config set --access-key ${{ secrets.MATRIX_AK }} --secret-key ${{ secrets.MATRIX_SK }}
|
run: matrix-cli config set --access-key ${{ secrets.MATRIX_AK }} --secret-key ${{ secrets.MATRIX_SK }}
|
||||||
- name: Use matrix-cli to deploy
|
- 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 }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user