Skip to content

Commit 0e36d60

Browse files
authored
Add additional-tag argument (#125)
1 parent efd0039 commit 0e36d60

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ Options:
8686
Additional version information like for base images.
8787
--release-tag
8888
Use this as main tag.
89+
--additional-tag
90+
Add additional tags that will be published
8991
--version-from <VERSION>
9092
Use this to set build_from tag if not specified.
9193
Architecture

builder.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ VERSION_BASE=
2828
VERSION_FROM=
2929
IMAGE=
3030
RELEASE=
31+
ADDITIONAL_TAGS=()
3132
BUILD_LIST=()
3233
BUILD_TYPE="addon"
3334
BUILD_TASKS=()
@@ -81,6 +82,8 @@ Options:
8182
Additional version information like for base images.
8283
--release-tag
8384
Use this as main tag.
85+
--additional-tag
86+
Add additional tags that will be published
8487
--version-from <VERSION>
8588
Use this to set build_from tag if not specified.
8689
@@ -292,6 +295,11 @@ function run_build() {
292295
docker_tags+=("latest")
293296
fi
294297

298+
# Add additional tags
299+
for tag_image in "${ADDITIONAL_TAGS[@]}"; do
300+
docker_tags+=("${tag_image}")
301+
done
302+
295303
# Tag images
296304
for tag_image in "${docker_tags[@]}"; do
297305
bashio::log.info "Create image tag: ${tag_image}"
@@ -812,6 +820,10 @@ while [[ $# -gt 0 ]]; do
812820
--test)
813821
DOCKER_PUSH=false
814822
;;
823+
--additional-tag)
824+
ADDITIONAL_TAGS+=("$2")
825+
shift
826+
;;
815827
--no-cache)
816828
DOCKER_CACHE=false
817829
;;

0 commit comments

Comments
 (0)