29 lines
712 B
YAML
29 lines
712 B
YAML
version: '3'
|
|
|
|
env:
|
|
IMAGE: jswank/aws-cli
|
|
TAG: alpine
|
|
|
|
tasks:
|
|
|
|
default:
|
|
cmds:
|
|
- task: build
|
|
|
|
build:
|
|
desc: build a new image
|
|
cmds:
|
|
- podman build -t ${IMAGE}:${TAG} {{.CLI_ARGS}} -f Dockerfile.${TAG} ctx
|
|
|
|
publish:
|
|
desc: publish the image
|
|
cmds:
|
|
- podman tag ${IMAGE}:${TAG} ${REGISTRY}/${IMAGE}:${TAG}
|
|
- echo "${{.REGISTRY_PASS_VAR}}" | podman login ${REGISTRY} -u ${REGISTRY_USER} --password-stdin
|
|
- podman push ${REGISTRY}/${IMAGE}:${TAG}
|
|
- podman logout ${REGISTRY}
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
REGISTRY_USER: jswank
|
|
REGISTRY_PASS_VAR: REGISTRY_PASSWORD # this environment variable will be passed to podman login as the password
|