4040 run : |
4141 TAG_NAME=${{ github.event.release.tag_name }}
4242 ID=`echo ${TAG_NAME##v}`
43- # 修正为新语法
44- echo "version=$ID" >> $GITHUB_OUTPUT
45-
43+ echo "::set-output name=version::$ID"
4644 - name : Build and push logstash
4745 uses : docker/build-push-action@v3
4846 with :
5351 tags : |
5452 dongtai/dongtai-logstash:${{ steps.release.outputs.version }}
5553 dongtai/dongtai-logstash:latest
56-
5754 - name : Build and push logrotate
5855 uses : docker/build-push-action@v3
5956 with :
6461 tags : |
6562 dongtai/dongtai-logrotate:${{ steps.release.outputs.version }}
6663 dongtai/dongtai-logrotate:latest
67-
6864 - name : Build and push Redis
6965 uses : docker/build-push-action@v2
7066 with :
7470 tags : |
7571 dongtai/dongtai-redis:${{ steps.release.outputs.version }}
7672 dongtai/dongtai-redis:latest
77-
7873 - name : finish build
7974 uses : joelwmale/webhook-action@master
8075 with :
@@ -83,14 +78,23 @@ jobs:
8378
8479 dongtai-mysql :
8580 name : dongtai-mysql
81+ # needs:
82+ # - Release-DongTai-Infra-Service
8683 runs-on : ubuntu-latest
84+ services :
85+ dongtai-mysql :
86+ image : dongtai/dongtai-mysql:latest
87+ ports :
88+ - 3306:3306
89+ dongtai-redis :
90+ image : dongtai/dongtai-redis:latest
91+ ports :
92+ - 6379:6379
8793 steps :
8894 - name : Checkout
8995 uses : actions/checkout@v3
90-
9196 - name : Set up QEMU
9297 uses : docker/setup-qemu-action@v2
93-
9498 - name : Set up Docker Buildx
9599 uses : docker/setup-buildx-action@v2
96100
@@ -111,24 +115,31 @@ jobs:
111115 run : |
112116 TAG_NAME=${{ github.event.release.tag_name }}
113117 ID=`echo ${TAG_NAME##v}`
114- # 修正为新语法
115- echo "version=$ID" >> $GITHUB_OUTPUT
118+ echo "::set-output name=version::$ID"
119+ - name : Build Mysql only schema to local
120+ working-directory : ./mysql
121+ run : |
122+ docker pull wukong.tencentcloudcr.com/dongtai/dongtai-server:${{ steps.release.outputs.version }}
123+ docker run -i --name dongtai-server-update -v $(pwd)/config-tutorial.ini:/opt/dongtai/dongtai_conf/conf/config.ini --rm --link `docker ps | grep dongtai-mysql | awk '{print $1}'`:dongtai-mysql \
124+ --link `docker ps | grep dongtai-redis | awk '{print $1}'`:dongtai-redis \
125+ --network ${{ job.container.network }} wukong.tencentcloudcr.com/dongtai/dongtai-server:${{ steps.release.outputs.version }} migrate || exit 1
126+ docker exec -i `docker ps | grep dongtai-mysql | awk '{print $1}'` /bin/bash -c "mysqldump dongtai_webapi -u root -p'dongtai-iast' --single-transaction" > dongtai-mysql-schema.sql || exit 1
116127
117- - name : Build and push Mysql (5.7)
128+ - name : Build Mysql only schema to local
118129 uses : docker/build-push-action@v3
119130 with :
120131 context : ./mysql
121132 push : true
122- # platforms: linux/amd64,linux/arm64
133+ # platforms: linux/amd64,linux/arm64
123134 tags : |
124135 dongtai/dongtai-mysql:${{ steps.release.outputs.version }}
136+ # dongtai/dongtai-mysql:latest
125137
126138 - name : Install Mysql 8.0
127139 working-directory : ./mysql
128140 run : |
129141 sed -i 's#5.7#8.0#g' Dockerfile
130-
131- - name : Build and push Mysql 8.0
142+ - name : Build Mysql 8.0
132143 uses : docker/build-push-action@v3
133144 with :
134145 context : ./mysql
0 commit comments