Update the build process to tag multiple images + documentation for it
This commit is contained in:
@@ -4,24 +4,21 @@ set -e
|
||||
# Development container builder
|
||||
#
|
||||
# Must authenticate first: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages
|
||||
# env vars:
|
||||
# env vars:
|
||||
# $EARTHLY_BUILD_BRANCH: git branch to checkout
|
||||
# $EARTHLY_BUILD_TAG: tag for container image
|
||||
|
||||
|
||||
EARTHLY_IMAGE_NAME="owncast"
|
||||
BUILD_TAG=${EARTHLY_BUILD_TAG:-webv2}
|
||||
DATE=$(date +"%Y%m%d")
|
||||
VERSION="${DATE}-${BUILD_TAG}"
|
||||
|
||||
|
||||
echo "Building container image ${EARTHLY_IMAGE_NAME}:${BUILD_TAG} ..."
|
||||
|
||||
# Change to the root directory of the repository
|
||||
cd "$(git rev-parse --show-toplevel)" || exit
|
||||
if [ -n "${EARTHLY_BUILD_BRANCH}" ]; then
|
||||
git checkout "${EARTHLY_BUILD_BRANCH}" || exit
|
||||
git checkout "${EARTHLY_BUILD_BRANCH}" || exit
|
||||
fi
|
||||
|
||||
earthly --ci +docker-all --image="ghcr.io/owncast/${EARTHLY_IMAGE_NAME}" --tag="${BUILD_TAG}" --version="${VERSION}"
|
||||
earthly --ci +dockerfile
|
||||
earthly --ci +docker-all --images="ghcr.io/owncast/${EARTHLY_IMAGE_NAME}:${BUILD_TAG}" --version="${VERSION}"
|
||||
|
||||
Reference in New Issue
Block a user