@@ -73,11 +73,16 @@ jobs:
7373 steps :
7474 - uses : actions/checkout@v4
7575
76+ - name : Add envs to GITHUB_ENV
77+ run : |
78+ short_sha=$(git rev-parse --short HEAD)
79+ echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV
80+
7681 - name : Build Interactive Image
7782 run : |
7883 cd ${GITHUB_WORKSPACE}
7984 python3 -m pip install --upgrade pip && python3 -m pip install click
80- python3 ./gsctl.py flexbuild interactive --app docker
85+ python3 ./gsctl.py flexbuild interactive --app docker --version ${SHORT_SHA}
8186
8287 - name : Release Nightly Image
8388 if : ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope' }}
8691 docker_username : ${{ secrets.DOCKER_USER }}
8792 run : |
8893 echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
89- sudo docker tag graphscope/interactive:latest ${{ env.INTERACTIVE_IMAGE }}:latest-amd64
94+ sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-amd64
95+ sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-amd64
96+
97+ sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:latest-amd64
9098 sudo docker push ${{ env.INTERACTIVE_IMAGE }}:latest-amd64
9199
92100 - name : Extract Tag Name
@@ -101,9 +109,55 @@ jobs:
101109 docker_username : ${{ secrets.DOCKER_USER }}
102110 run : |
103111 echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
104- sudo docker tag graphscope/interactive:latest ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
112+ sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
105113 sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-amd64
106114
115+ build-interactive-image-arm64 :
116+ if : (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
117+ runs-on : ubuntu-22.04-arm
118+
119+ steps :
120+ - uses : actions/checkout@v4
121+
122+ - name : Add envs to GITHUB_ENV
123+ run : |
124+ short_sha=$(git rev-parse --short HEAD)
125+ echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV
126+
127+ - name : Build Interactive Image
128+ run : |
129+ cd ${GITHUB_WORKSPACE}
130+ python3 -m pip install --upgrade pip && python3 -m pip install click
131+ python3 ./gsctl.py flexbuild interactive --app docker --version ${SHORT_SHA}
132+
133+ - name : Release Nightly Image
134+ if : ${{ github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope' }}
135+ env :
136+ docker_password : ${{ secrets.DOCKER_PASSWORD }}
137+ docker_username : ${{ secrets.DOCKER_USER }}
138+ run : |
139+ echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
140+ sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-arm64
141+ sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${SHORT_SHA}-arm64
142+
143+ sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:latest-arm64
144+ sudo docker push ${{ env.INTERACTIVE_IMAGE }}:latest-arm64
145+
146+ - name : Extract Tag Name
147+ if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
148+ id : tag
149+ run : echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
150+
151+ - name : Release Image
152+ if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope' }}
153+ env :
154+ docker_password : ${{ secrets.DOCKER_PASSWORD }}
155+ docker_username : ${{ secrets.DOCKER_USER }}
156+ run : |
157+ echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.DOCKER_URL }} --password-stdin
158+ sudo docker tag graphscope/interactive:${SHORT_SHA} ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
159+ sudo docker push ${{ env.INTERACTIVE_IMAGE }}:${{ steps.tag.outputs.TAG }}-arm64
160+
107161 build-gss-image-amd64 :
108162 if : (github.ref == 'refs/heads/main' && github.repository == 'alibaba/GraphScope') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'alibaba/GraphScope')
109163 runs-on : ubuntu-20.04
0 commit comments