Remove reuse actions for release image
This commit is contained in:
		
							parent
							
								
									f46dbbad11
								
							
						
					
					
						commit
						0b93c187f4
					
				| @ -12,12 +12,6 @@ on: | ||||
|         description: 'Whether it is a release image or test image (must choose from <Y/N/T>)' | ||||
|         required: true | ||||
|         default: 'N' | ||||
|       # If rc image works well, directly tag with the release version | ||||
|       # source image: "reuse_image" specified here | ||||
|       # target iamge: Get from the current source code | ||||
|       reuse_image: | ||||
|         description: 'Set reuse image name, e.g.: 0.30.0-rc (When release is set to <Y>, admin can choose to reuse an old rc image as the new release image)' | ||||
|         required: false | ||||
| 
 | ||||
| jobs: | ||||
|   generate-anolis-image: | ||||
| @ -44,6 +38,16 @@ jobs: | ||||
|         # ${GITHUB_REF##*/} == branch-name | ||||
|         run: echo "OCCLUM_BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV; | ||||
| 
 | ||||
|       - name: Get image tag name for release image | ||||
|         if: github.event.inputs.release == 'Y' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for dev image | ||||
|         if: github.event.inputs.release == 'N' | ||||
|         run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for test image | ||||
|         if: github.event.inputs.release == 'T' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV | ||||
| 
 | ||||
|       - name: Set up QEMU | ||||
|         uses: docker/setup-qemu-action@v1 | ||||
| 
 | ||||
| @ -58,19 +62,7 @@ jobs: | ||||
|           username: ${{ secrets.DOCKER_USERNAME }} | ||||
|           password: ${{ secrets.DOCKER_PASSWORD }} | ||||
| 
 | ||||
|       - name: Get image tag name for release image | ||||
|         if: github.event.inputs.release == 'Y' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for dev image | ||||
|         if: github.event.inputs.release == 'N' | ||||
|         run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for test image | ||||
|         if: github.event.inputs.release == 'T' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV | ||||
| 
 | ||||
|       # Rebuild new image | ||||
|       - name: Build and push | ||||
|         if: "${{ github.event.inputs.reuse_image == '' }}" | ||||
|         uses: docker/build-push-action@v2 | ||||
|         with: | ||||
|           context: . | ||||
| @ -80,15 +72,6 @@ jobs: | ||||
|           push: true | ||||
|           tags: occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8 | ||||
| 
 | ||||
|       # Reuse old image | ||||
|       - name: Reuse old image | ||||
|         if: "${{ github.event.inputs.reuse_image != '' }}" | ||||
|         run: | | ||||
|           echo "REUSE_VERSION=${{ github.event.inputs.reuse_image }}" >> $GITHUB_ENV; | ||||
|           docker pull occlum/occlum:${{ env.REUSE_VERSION }}-anolis8.8 | ||||
|           docker tag occlum/occlum:${{ env.REUSE_VERSION }}-anolis8.8 occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8 | ||||
|           docker push occlum/occlum:${{ env.IMAGE_TAG }}-anolis8.8 | ||||
| 
 | ||||
| 
 | ||||
|   generate-ubuntu20-image: | ||||
|       runs-on: ubuntu-20.04 | ||||
| @ -113,6 +96,16 @@ jobs: | ||||
|         # ${GITHUB_REF##*/} == branch-name | ||||
|         run: echo "OCCLUM_BRANCH=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV; | ||||
| 
 | ||||
|       - name: Get image tag name for release image | ||||
|         if: github.event.inputs.release == 'Y' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for dev image | ||||
|         if: github.event.inputs.release == 'N' | ||||
|         run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for test image | ||||
|         if: github.event.inputs.release == 'T' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV | ||||
| 
 | ||||
|       - name: Set up QEMU | ||||
|         uses: docker/setup-qemu-action@v1 | ||||
| 
 | ||||
| @ -127,19 +120,7 @@ jobs: | ||||
|           username: ${{ secrets.DOCKER_USERNAME }} | ||||
|           password: ${{ secrets.DOCKER_PASSWORD }} | ||||
| 
 | ||||
|       - name: Get image tag name for release image | ||||
|         if: github.event.inputs.release == 'Y' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for dev image | ||||
|         if: github.event.inputs.release == 'N' | ||||
|         run: echo "IMAGE_TAG=latest-dev-${GITHUB_SHA:0:7}" >> $GITHUB_ENV | ||||
|       - name: Get image tage name for test image | ||||
|         if: github.event.inputs.release == 'T' | ||||
|         run: echo "IMAGE_TAG=${{ env.RELEASE_VERSION }}-test" >> $GITHUB_ENV | ||||
| 
 | ||||
|       # Rebuild new image | ||||
|       - name: Build and push | ||||
|         if: "${{ github.event.inputs.reuse_image == '' }}" | ||||
|         uses: docker/build-push-action@v2 | ||||
|         with: | ||||
|           context: . | ||||
| @ -148,12 +129,3 @@ jobs: | ||||
|           build-args: OCCLUM_BRANCH=${{ env.OCCLUM_BRANCH }} | ||||
|           push: true | ||||
|           tags: occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04 | ||||
| 
 | ||||
|       # Reuse old image | ||||
|       - name: Reuse old image | ||||
|         if: "${{ github.event.inputs.reuse_image != '' }}" | ||||
|         run: | | ||||
|           echo "REUSE_VERSION=${{ github.event.inputs.reuse_image }}" >> $GITHUB_ENV; | ||||
|           docker pull occlum/occlum:${{ env.REUSE_VERSION }}-ubuntu20.04 | ||||
|           docker tag occlum/occlum:${{ env.REUSE_VERSION }}-ubuntu20.04 occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04 | ||||
|           docker push occlum/occlum:${{ env.IMAGE_TAG }}-ubuntu20.04 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user