22 lines
547 B
Makefile
22 lines
547 B
Makefile
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}} {{registry}}/{{image}}
|
|
@ echo "${{ registry_pass_var }}" | podman login {{registry}} -u {{registry_user}} --password-stdin
|
|
@ podman push {{registry}}/{{image}}
|
|
@ podman logout {{registry}}
|
|
|