Skip to content

Add additional-tag argument #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Options:
Additional version information like for base images.
--release-tag
Use this as main tag.
--additional-tag
Add additional tags that will be published
--version-from <VERSION>
Use this to set build_from tag if not specified.
Architecture
Expand Down
12 changes: 12 additions & 0 deletions builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ VERSION_BASE=
VERSION_FROM=
IMAGE=
RELEASE=
ADDITIONAL_TAGS=()
BUILD_LIST=()
BUILD_TYPE="addon"
BUILD_TASKS=()
Expand Down Expand Up @@ -81,6 +82,8 @@ Options:
Additional version information like for base images.
--release-tag
Use this as main tag.
--additional-tag
Add additional tags that will be published
--version-from <VERSION>
Use this to set build_from tag if not specified.

Expand Down Expand Up @@ -292,6 +295,11 @@ function run_build() {
docker_tags+=("latest")
fi

# Add additional tags
for tag_image in "${ADDITIONAL_TAGS[@]}"; do
docker_tags+=("${tag_image}")
done

# Tag images
for tag_image in "${docker_tags[@]}"; do
bashio::log.info "Create image tag: ${tag_image}"
Expand Down Expand Up @@ -812,6 +820,10 @@ while [[ $# -gt 0 ]]; do
--test)
DOCKER_PUSH=false
;;
--additional-tag)
ADDITIONAL_TAGS+=("$2")
shift
;;
--no-cache)
DOCKER_CACHE=false
;;
Expand Down