3737 username : ${{ secrets.DONGTAI_DOCKERHUB_USERNAME }}
3838 password : ${{ secrets.DONGTAI_DOCKERHUB_TOKEN }}
3939
40- # - name: Login to AliyunRegistry
41- # uses: docker/login-action@v1
42- # with:
43- # registry: ${{ secrets.ALIYUN_REGISTRY }}
44- # username: ${{ secrets.ALIYUN_DOCKERHUB_USER }}
45- # password: ${{ secrets.ALIYUN_DOCKERHUB_PASSWORD }}
46-
4740 - name : test and build
4841 run : |
4942 npm ci
6760 echo "${{ github.event.repository.name }},commit_hash,${GITHUB_SHA}" >> dist/version.txt && \
6861 cat dist/version.txt \
6962
70- -
uses :
manyuanrong/[email protected] 71- with :
72- endpoint : " oss-cn-beijing.aliyuncs.com"
73- access-key-id : ${{ secrets.OSS_KEY_ID }}
74- access-key-secret : ${{ secrets.OSS_KEY_SECRET }}
75-
76- - name : Upload version file to oss
77- run : |
78- ossutil cp -rf dist/version.txt oss://huoqi-public/iast/release-version/${{ github.event.repository.name }}/${{ steps.release.outputs.VERSION }}/version.txt
79-
80- - name : Merge all version file
81- run : |
82- echo "DongTai,version,${{ steps.release.outputs.VERSION }}" > dist/version.txt
83- ossutil cp oss://huoqi-public/iast/release-version/DongTai-web/${{ steps.release.outputs.VERSION }}/version.txt DongTai-web.version.txt || true
84- ossutil cp oss://huoqi-public/iast/release-version/DongTai-webapi/${{ steps.release.outputs.VERSION }}/version.txt DongTai-webapi.version.txt || true
85- ossutil cp oss://huoqi-public/iast/release-version/DongTai-openapi/${{ steps.release.outputs.VERSION }}/version.txt DongTai-openapi.version.txt || true
86- ossutil cp oss://huoqi-public/iast/release-version/DongTai-engine/${{ steps.release.outputs.VERSION }}/version.txt DongTai-engine.version.txt || true
87- ossutil cp oss://huoqi-public/iast/release-version/DongTai-agent-python/${{ steps.release.outputs.VERSION }}/version.txt DongTai-agent-python.version.txt || true
88- ossutil cp oss://huoqi-public/iast/release-version/DongTai-agent-java/${{ steps.release.outputs.VERSION }}/version.txt DongTai-agent-java.version.txt || true
89- ossutil cp oss://huoqi-public/iast/release-version/DongTai-agent-php/${{ steps.release.outputs.VERSION }}/version.txt DongTai-agent-php.version.txt || true
90- cat *.version.txt >> dist/version.txt
91- cat dist/version.txt
92-
93- - name : Save image to tar file
94- run : |
95- docker save dongtai/dongtai-web:${{ steps.release.outputs.version }} | gzip > /tmp/dongtai-web-${{ steps.release.outputs.version }}.tar.gz
96-
97- - name : Setup Ossutil
98- uses :
manyuanrong/[email protected] 99- with :
100- endpoint : ${{ secrets.OSS_ENDPOINT }}
101- access-key-id : ${{ secrets.OSS_KEY_ID }}
102- access-key-secret : ${{ secrets.OSS_KEY_SECRET }}
103-
104- - name : Upload images to oss
105- run : |
106- ossutil cp /tmp/dongtai-web-${{ steps.release.outputs.version }}.tar.gz oss://huoqi-public/iast/server-package/${{ steps.release.outputs.version }}/
107-
10863 - name : Build and push
10964 uses : docker/build-push-action@v2
11065 with :
@@ -115,15 +70,6 @@ jobs:
11570 dongtai/dongtai-web:${{ steps.release.outputs.VERSION }}
11671 dongtai/dongtai-web:latest
11772
118- # - name: Deploy to staging
119- # uses: wahyd4/kubectl-helm-action@master
120- # env:
121- # KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
122- # with:
123- # args: |
124- # find deploy/deploy-eks-iast-saas-web-prod.yml -type f -exec sed -i 's/VERSION/${{ steps.release.outputs.VERSION }}/g' {} \;
125- # ls deploy/deploy-eks-iast-saas-web-prod.yml | xargs -I {} kubectl apply -f {}
126-
12773
12874 - name : finish build
12975 uses : joelwmale/webhook-action@master
0 commit comments