Add VERSION to image names

This commit is contained in:
uazo 2023-03-08 17:51:49 +09:00 committed by GitHub
parent b438ab71d9
commit b0e084df8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,14 +114,14 @@ jobs:
fi fi
fi fi
- name: Building bromite container ${{ env.BROMITE_SHA }} - name: Building bromite container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
shell: bash shell: bash
run: | 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 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 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 BROMITE_SHA=$BROMITE_SHA \
--build-arg VERSION=$VERSION \ --build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \ --build-arg HTTP_PROXY="$PROXY_ADDR" \
@ -129,15 +129,16 @@ jobs:
fi fi
fi fi
- name: Building bromite-build container ${{ env.BROMITE_SHA }} - name: Building bromite-build container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
shell: bash shell: bash
run: | 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 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 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 BROMITE_SHA=$BROMITE_SHA \
--build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \ --build-arg HTTP_PROXY="$PROXY_ADDR" \
--no-cache \ --no-cache \
bromite-buildtools/images/bromite-build/. bromite-buildtools/images/bromite-build/.
@ -151,7 +152,7 @@ jobs:
if [ $IS_PRESENT -eq "0" ]; then if [ $IS_PRESENT -eq "0" ]; then
docker rmi uazo/bromite-build:build docker rmi uazo/bromite-build:build
fi 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: build:
runs-on: ${{ github.event.inputs.type }} runs-on: ${{ github.event.inputs.type }}