Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Commit fa3ca68

Browse files
committed
Add docker image to aliyun and oss
1 parent e39d4fe commit fa3ca68

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/release_openapi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,33 @@ jobs:
108108
username: ${{ secrets.ALIYUN_DOCKERHUB_USER }}
109109
password: ${{ secrets.ALIYUN_DOCKERHUB_PASSWORD }}
110110

111+
112+
- name: Build to local
113+
uses: docker/build-push-action@v2
114+
with:
115+
context: .
116+
load: true
117+
tags: |
118+
dongtai/dongtai-openapi:${{ steps.release.outputs.version }}
119+
dongtai/dongtai-openapi:latest
120+
registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-openapi:${{ steps.release.outputs.version }}
121+
registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-openapi:latest
122+
123+
- name: Save image to tar file
124+
run: |
125+
docker save dongtai/dongtai-openapi:${{ steps.release.outputs.version }} | gzip > /tmp/dongtai-openapi-${{ steps.release.outputs.version }}.tar.gz
126+
127+
- name: Setup Ossutil
128+
uses: manyuanrong/[email protected]
129+
with:
130+
endpoint: ${{ secrets.ALIYUN_OSS_ENDPOINT }}
131+
access-key-id: ${{ secrets.ALIYUN_OSS_KEY_ID }}
132+
access-key-secret: ${{ secrets.ALIYUN_OSS_KEY_SECRET }}
133+
134+
- name: Upload images to oss
135+
run: |
136+
ossutil cp /tmp/dongtai-openapi-${{ steps.release.outputs.version }}.tar.gz oss://huoqi-public/iast/server-package/${{ steps.release.outputs.version }}/
137+
111138
- name: Build and push
112139
uses: docker/build-push-action@v2
113140
with:
@@ -119,6 +146,14 @@ jobs:
119146
registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-openapi:${{ steps.release.outputs.version }}
120147
registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-openapi:latest
121148
149+
- name: Deploy to staging
150+
uses: wahyd4/kubectl-helm-action@master
151+
env:
152+
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
153+
with:
154+
args: |
155+
find deploy/deploy-eks-iast-saas-openapi-prod.yml -type f -exec sed -i 's/VERSION/${{ steps.release.outputs.version }}/g' {} \;
156+
ls deploy/deploy-eks-iast-saas-openapi-prod.yml | xargs -I {} kubectl apply -f {}
122157
123158
- name: finish build
124159
uses: joelwmale/webhook-action@master

0 commit comments

Comments
 (0)