Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5d0b45

Browse files
authored
feat: add date-suffixed tags to built images (#274)
1 parent b9c645d commit e5d0b45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/push_images.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ if [ $QUIET = true ]; then
8888
)
8989
fi
9090

91+
date_str=$(date --utc +%Y%m%d)
9192
for image in "${IMAGES[@]}"; do
9293
image_dir="$PROJECT_ROOT/images/$image"
9394
image_file="${TAG}.Dockerfile"
9495
image_ref="codercom/enterprise-$image:$TAG"
96+
image_ref_date="${image_ref}-${date_str}"
9597
image_path="$image_dir/$image_file"
9698

9799
if [ ! -f "$image_path" ]; then
@@ -103,5 +105,6 @@ for image in "${IMAGES[@]}"; do
103105

104106
build_id=$(cat "build_${image}.json" | jq -r .\[\"depot.build\"\].buildID)
105107
run_trace $DRY_RUN depot push --project "gb3p8xrshk" --tag "$image_ref" "$build_id"
108+
run_trace $DRY_RUN depot push --project "gb3p8xrshk" --tag "$image_ref_date" "$build_id"
106109
run_trace $DRY_RUN depot push --project "gb3p8xrshk" --tag "codercom/enterprise-${image}:latest" "$build_id"
107110
done

0 commit comments

Comments
 (0)