add quit flag to docker push
This commit is contained in:
12
app/build.sh
12
app/build.sh
@@ -4,7 +4,7 @@
|
|||||||
# rc: release candidate build
|
# rc: release candidate build
|
||||||
# rel: release build and push to ghcr.io
|
# rel: release build and push to ghcr.io
|
||||||
# Note: for release build, you need to set GHCR_TOKEN
|
# Note: for release build, you need to set GHCR_TOKEN
|
||||||
# export GHCR_TOKEN=<YOUR_GITHUB_TOKEN> in your .profile
|
# export GHCR_TOKEN=<YOUR_GITHUB_TOKEN> in your .zprofile
|
||||||
# see also: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
|
# see also: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
|
||||||
|
|
||||||
|
|
||||||
@@ -39,16 +39,16 @@ elif [[ $1 == rc ]];then
|
|||||||
docker build --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:rc -t ${IMAGE}:${VERSION} app
|
docker build --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:rc -t ${IMAGE}:${VERSION} app
|
||||||
echo 'login to ghcr.io'
|
echo 'login to ghcr.io'
|
||||||
echo $GHCR_TOKEN | docker login ghcr.io -u s-allius --password-stdin
|
echo $GHCR_TOKEN | docker login ghcr.io -u s-allius --password-stdin
|
||||||
docker push ghcr.io/s-allius/tsun-gen3-proxy:rc
|
docker push -q ghcr.io/s-allius/tsun-gen3-proxy:rc
|
||||||
docker push ghcr.io/s-allius/tsun-gen3-proxy:${VERSION}
|
docker push -q ghcr.io/s-allius/tsun-gen3-proxy:${VERSION}
|
||||||
|
|
||||||
elif [[ $1 == rel ]];then
|
elif [[ $1 == rel ]];then
|
||||||
docker build --no-cache --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:latest -t ${IMAGE}:${MAJOR} -t ${IMAGE}:${VERSION} app
|
docker build --no-cache --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:latest -t ${IMAGE}:${MAJOR} -t ${IMAGE}:${VERSION} app
|
||||||
echo 'login to ghcr.io'
|
echo 'login to ghcr.io'
|
||||||
echo $GHCR_TOKEN | docker login ghcr.io -u s-allius --password-stdin
|
echo $GHCR_TOKEN | docker login ghcr.io -u s-allius --password-stdin
|
||||||
docker push ghcr.io/s-allius/tsun-gen3-proxy:latest
|
docker push -q ghcr.io/s-allius/tsun-gen3-proxy:latest
|
||||||
docker push ghcr.io/s-allius/tsun-gen3-proxy:${MAJOR}
|
docker push -q ghcr.io/s-allius/tsun-gen3-proxy:${MAJOR}
|
||||||
docker push ghcr.io/s-allius/tsun-gen3-proxy:${VERSION}
|
docker push -q ghcr.io/s-allius/tsun-gen3-proxy:${VERSION}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'check docker-compose.yaml file'
|
echo 'check docker-compose.yaml file'
|
||||||
|
|||||||
Reference in New Issue
Block a user