From f8b7e54c8fde0295b38179b2deea15da6f4a0247 Mon Sep 17 00:00:00 2001 From: Jason Swank Date: Mon, 8 May 2023 22:20:12 -0400 Subject: [PATCH] add support for alt tag --- justfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/justfile b/justfile index 940a62f..801f0f3 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,7 @@ set dotenv-load tag := `grep ^FROM Dockerfile | cut -d: -f2` -image := "jswank/alpine-cli:" + tag +image := "jswank/alpine-cli" registry := "ghcr.io" registry_user := "jswank" @@ -11,12 +11,11 @@ registry_pass_var := "REGISTRY_PASSWORD" # build a new image build: - podman build -t {{image}} -f Dockerfile ctx + podman build -t {{image}}:{{tag}} -f Dockerfile ctx # publish the image -publish: - @ podman tag {{image}} {{registry}}/{{image}} +publish alt_tag=tag: + @ podman tag {{image}}:{{tag}} {{registry}}/{{image}}:{{alt_tag}} @ echo "${{ registry_pass_var }}" | podman login {{registry}} -u {{registry_user}} --password-stdin - @ podman push {{registry}}/{{image}} + @ podman push {{registry}}/{{image}}:{{alt_tag}} @ podman logout {{registry}} -