From 069614310c517dfd37b630bbfa090159eaa8bfbc Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 26 Feb 2022 20:16:39 +0000 Subject: [PATCH] build: update building and pushing image tasks --- run | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/run b/run index 6a52c9cf..245428b5 100755 --- a/run +++ b/run @@ -1,6 +1,6 @@ #!/bin/bash -set -eu +set -eux TTY="" if [[ ! -t 1 ]]; then @@ -10,17 +10,13 @@ fi DC="${DC:-exec}" function ci:build-images { - services=(app) - - DOCKER_TAG="$1" docker-compose build "${services[@]}" - DOCKER_TAG="latest" docker-compose build "${services[@]}" + docker build --target production -t ghcr.io/opdavies/oliverdavies.uk-build:latest . + docker build --target production -t ghcr.io/opdavies/oliverdavies.uk-build:$(git rev-parse HEAD) . } function ci:push-images { - services=(app) - - DOCKER_TAG="$1" docker-compose push "${services[@]}" - DOCKER_TAG="latest" docker-compose push "${services[@]}" + docker push ghcr.io/opdavies/oliverdavies.uk-build:latest + docker push ghcr.io/opdavies/oliverdavies.uk-build:$(git rev-parse HEAD) } function cmd {