21 lines
491 B
Bash
Executable file
21 lines
491 B
Bash
Executable file
#!/bin/bash
|
|
set -Eeuxo pipefail
|
|
|
|
AKKOMA_COMMIT=$(cd akkoma; git rev-parse HEAD)
|
|
LOCAL_COMMIT=$(git rev-parse HEAD)
|
|
AKKOMA_BASE_IMAGE="registry.nrd.li/nrdli/akkoma-base:${AKKOMA_COMMIT}"
|
|
AKKOMA_FINAL_IMAGE="registry.nrd.li/nrdli/akkoma:${LOCAL_COMMIT}"
|
|
|
|
pushd akkoma
|
|
docker build \
|
|
-t "${AKKOMA_BASE_IMAGE}" \
|
|
.
|
|
docker push "${AKKOMA_BASE_IMAGE}"
|
|
popd
|
|
|
|
docker build \
|
|
-t "${AKKOMA_FINAL_IMAGE}" \
|
|
--build-arg "AKKOMA_COMMIT=${AKKOMA_COMMIT}" \
|
|
.
|
|
docker push "${AKKOMA_FINAL_IMAGE}"
|