update publish process

This commit is contained in:
2023-05-01 14:01:27 -04:00
parent b3ad8f2b0a
commit 86eba2506a
2 changed files with 13 additions and 13 deletions

View File

@@ -2,21 +2,20 @@ set dotenv-load
image := "jswank/alpine-cli:latest"
registry := "ghcr.io"
registry_user := "jswank"
# this environment variable will be passed to podman login as the password
registry_pass_var := "REGISTRY_PASSWORD"
# build a new image
build:
podman build -t {{image}} -f Dockerfile ctx
# publish the image
publish:
@ podman tag {{image}} ghcr.io/{{image}}
@ echo $GH_PAT | podman login ghcr.io -u jswank --password-stdin >/dev/null 2>&1
podman push ghcr.io/{{image}}
@ podman logout ghcr.io
# publish the image to Dockerhub / docker.io
publish-dh:
@ podman tag {{image}} docker.io/{{image}}
@ echo $DH_PAT | podman login docker.io -u jswank --password-stdin >/dev/null 2>&1
podman push docker.io/{{image}}
@ podman logout docker.io
@ podman tag {{image}} {{registry}}/{{image}}
@ echo "${{ registry_pass_var }}" | podman login {{registry}} -u {{registry_user}} --password-stdin
@ podman push {{registry}}/{{image}}
@ podman logout {{registry}}