build: update building and pushing image tasks
This commit is contained in:
parent
97a22c304a
commit
069614310c
14
run
14
run
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -eux
|
||||||
|
|
||||||
TTY=""
|
TTY=""
|
||||||
if [[ ! -t 1 ]]; then
|
if [[ ! -t 1 ]]; then
|
||||||
|
@ -10,17 +10,13 @@ fi
|
||||||
DC="${DC:-exec}"
|
DC="${DC:-exec}"
|
||||||
|
|
||||||
function ci:build-images {
|
function ci:build-images {
|
||||||
services=(app)
|
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) .
|
||||||
DOCKER_TAG="$1" docker-compose build "${services[@]}"
|
|
||||||
DOCKER_TAG="latest" docker-compose build "${services[@]}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ci:push-images {
|
function ci:push-images {
|
||||||
services=(app)
|
docker push ghcr.io/opdavies/oliverdavies.uk-build:latest
|
||||||
|
docker push ghcr.io/opdavies/oliverdavies.uk-build:$(git rev-parse HEAD)
|
||||||
DOCKER_TAG="$1" docker-compose push "${services[@]}"
|
|
||||||
DOCKER_TAG="latest" docker-compose push "${services[@]}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cmd {
|
function cmd {
|
||||||
|
|
Loading…
Reference in a new issue