From b0e084df8e5d79d28c39f7eeea6ef76bcb6a5a69 Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Wed, 8 Mar 2023 17:51:49 +0900 Subject: [PATCH] Add VERSION to image names --- .github/workflows/build_bromite_dev.yaml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_bromite_dev.yaml b/.github/workflows/build_bromite_dev.yaml index 45875cd..e595962 100644 --- a/.github/workflows/build_bromite_dev.yaml +++ b/.github/workflows/build_bromite_dev.yaml @@ -114,14 +114,14 @@ jobs: fi fi - - name: Building bromite container ${{ env.BROMITE_SHA }} + - name: Building bromite container ${{ env.VERSION }}-${{ env.BROMITE_SHA }} shell: bash run: | - IS_PRESENT=$(docker inspect --type=image uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?) + IS_PRESENT=$(docker inspect --type=image uazo/bromite:$VERSION-$BROMITE_SHA > /dev/null ; echo $?) if [ $IS_PRESENT -ne "0" ]; then - IS_PRESENT=$(docker manifest inspect uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?) + IS_PRESENT=$(docker manifest inspect uazo/bromite:$VERSION-$BROMITE_SHA > /dev/null ; echo $?) if [ $IS_PRESENT -ne "0" ]; then - DOCKER_BUILDKIT=1 docker build -t uazo/bromite:$BROMITE_SHA --progress plain \ + DOCKER_BUILDKIT=1 docker build -t uazo/bromite:$VERSION-$BROMITE_SHA --progress plain \ --build-arg BROMITE_SHA=$BROMITE_SHA \ --build-arg VERSION=$VERSION \ --build-arg HTTP_PROXY="$PROXY_ADDR" \ @@ -129,15 +129,16 @@ jobs: fi fi - - name: Building bromite-build container ${{ env.BROMITE_SHA }} + - name: Building bromite-build container ${{ env.VERSION }}-${{ env.BROMITE_SHA }} shell: bash run: | - IS_PRESENT=$(docker inspect --type=image uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) + IS_PRESENT=$(docker inspect --type=image uazo/bromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?) if [ $IS_PRESENT -ne "0" ]; then - IS_PRESENT=$(docker manifest inspect uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) + IS_PRESENT=$(docker manifest inspect uazo/bromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?) if [ $IS_PRESENT -ne "0" ]; then - DOCKER_BUILDKIT=1 docker build -t uazo/bromite-build:$BROMITE_SHA --progress plain \ + DOCKER_BUILDKIT=1 docker build -t uazo/bromite-build:$VERSION-$BROMITE_SHA --progress plain \ --build-arg BROMITE_SHA=$BROMITE_SHA \ + --build-arg VERSION=$VERSION \ --build-arg HTTP_PROXY="$PROXY_ADDR" \ --no-cache \ bromite-buildtools/images/bromite-build/. @@ -151,7 +152,7 @@ jobs: if [ $IS_PRESENT -eq "0" ]; then docker rmi uazo/bromite-build:build fi - docker tag uazo/bromite-build:$BROMITE_SHA uazo/bromite-build:build + docker tag uazo/bromite-build:$VERSION-$BROMITE_SHA uazo/bromite-build:build build: runs-on: ${{ github.event.inputs.type }}