From 8d076daef10e2308bf9c3bf3bac613525ac510f4 Mon Sep 17 00:00:00 2001 From: duanmengkk Date: Fri, 15 Mar 2024 09:01:40 +0800 Subject: [PATCH] use make update-go-verison to update go version in Dockerfile Signed-off-by: duanmengkk --- .github/workflows/build-image-base.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-image-base.yaml b/.github/workflows/build-image-base.yaml index fc58fd8067..233092973e 100644 --- a/.github/workflows/build-image-base.yaml +++ b/.github/workflows/build-image-base.yaml @@ -81,14 +81,15 @@ jobs: - name: Generating Base Image Tag id: base_tag run: | - echo "tag=$(git ls-tree --full-tree HEAD -- ./${{ env.IMAGE_ROOT_PATH }}/${{ env.IMAGE_NAME }} | awk '{ print $3 }')" >> $GITHUB_ENV + echo "::set-output name=tag::$(git ls-tree --full-tree HEAD -- images/baseimage | awk '{ print $3 }')" + # echo "tag=$(git ls-tree --full-tree HEAD -- ./${{ env.IMAGE_ROOT_PATH }}/${{ env.IMAGE_NAME }} | awk '{ print $3 }')" >> $GITHUB_ENV # check whether we have upload the same base image to online register , if so, we could not build it - name: Checking if tag already exists id: tag-in-repositories shell: bash run: | - if docker buildx imagetools inspect ${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.tag }} &>/dev/null; then + if docker buildx imagetools inspect ${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ steps.base_tag.outputs.tag }} &>/dev/null; then echo "exists=true" >> $GITHUB_ENV echo "the target base image exist , no need to build it " else @@ -117,7 +118,7 @@ jobs: github-token: ${{ secrets.WELAN_PAT }} platforms: ${{ env.BUILD_PLATFORM }} tags: | - ${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.tag }} + ${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ steps.base_tag.outputs.tag }} - name: Image Release Digest if: ${{ env.exists == 'false' }} @@ -126,7 +127,7 @@ jobs: mkdir -p image-digest/ echo "## ${{ env.IMAGE_NAME }}" > image-digest/${{ env.IMAGE_NAME }}.txt echo "" >> image-digest/${{ env.IMAGE_NAME }}.txt - echo "\`${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ env.tag }}@${{ steps.docker_build_release.outputs.digest }}\`" >> image-digest/${{ env.IMAGE_NAME }}.txt + echo "\`${{ env.ONLINE_REGISTER }}/${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:${{ steps.base_tag.outputs.tag }}@${{ steps.docker_build_release.outputs.digest }}\`" >> image-digest/${{ env.IMAGE_NAME }}.txt echo "" >> image-digest/${{ env.IMAGE_NAME }}.txt - name: Upload artifact digests