saleor-apps-rs/Makefile.toml

43 lines
1.2 KiB
TOML

# Configures the default task to run
[tasks.default]
alias = "build-containers"
# Overrides the default build task
[tasks.build]
alias = "build-containers"
[tasks.build-sitemap-generator]
workspace = false
script = '''
docker build --rm --target chef-sitemap-generator .
docker tag $(docker image ls -q --filter=label=service=chef-sitemap-generator) ghcr.io/djkato/saleor-sitemap-generator
'''
[tasks.build-simple-payment-gateway]
workspace = false
script = '''
docker build --rm --target chef-simple-payment-gateway .
docker tag $(docker image ls -q --filter=label=service=chef-simple-payment-gateway) ghcr.io/djkato/saleor-simple-payment-gateway
'''
[tasks.build-containers]
workspace = false
dependencies = [
"delete-images",
"build-sitemap-generator",
"build-simple-payment-gateway",
]
[tasks.push-containers]
workspace = false
script = '''
docker push ghcr.io/djkato/saleor-sitemap-generator:latest
docker push ghcr.io/djkato/saleor-simple-payment-gateway:latest
'''
[tasks.delete-images]
workspace = false
script = '''
docker rmi -f $(docker image ls -q --filter=label=service=chef-sitemap-generator) 2>&1 || true
docker rmi -f $(docker image ls -q --filter=label=service=chef-simple-payment-gateway) 2>&1 || true
'''