akkoma-build/build.sh
2023-07-23 03:49:40 +00:00

20 lines
451 B
Bash
Executable file

#!/bin/bash
set -Eeuxo pipefail
AKKOMA_COMMIT=$(cd src; git rev-parse HEAD)
AKKOMA_BASE_IMAGE="registry.nrd.li/nrdli/akkoma-base:${AKKOMA_COMMIT}"
AKKOMA_FINAL_IMAGE="registry.nrd.li/nrdli/akkoma:${AKKOMA_COMMIT}"
pushd src
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}"