summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2022-05-22 13:40:40 -0400
committersiddharth <s@ricketyspace.net>2022-05-22 13:40:40 -0400
commitc1ac95c9e05c056489a20c025ced8d22218576e2 (patch)
tree6d7eb2bc3879cba8e0f857bf436ec36f71a42a1f /bin
parentd5b2de8b9ed0cf61a8ccf74d44d296b9cb2557aa (diff)
Makefile: add image-push
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile2
-rwxr-xr-xbin/image-push15
2 files changed, 16 insertions, 1 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 49e36a1..3282a34 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -1,4 +1,4 @@
-SH_FILES=image
+SH_FILES=image image-push
all: check fmt
.PHONY: all
diff --git a/bin/image-push b/bin/image-push
new file mode 100755
index 0000000..1eb6b56
--- /dev/null
+++ b/bin/image-push
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+#
+# SPDX-License-Identifier: ISC
+# Copyright © 2022 siddharth <s@ricketyspace.net>
+
+REPO="public.ecr.aws/w3h8c8i8/peach"
+
+# Find the most recent tag.
+TAG=$(docker images "$REPO" --format "{{.Tag}}" | head -n 1)
+if [ -z "$TAG" ]; then
+ echo "No recent tags found"
+ exit 1
+fi
+
+docker push "$REPO":"$TAG"