update publish process
This commit is contained in:
21
justfile
21
justfile
@@ -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}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user