2023-07-23 03:49:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
|
2023-07-23 08:17:35 +00:00
|
|
|
AKKOMA_COMMIT=$(cd akkoma; git rev-parse HEAD)
|
2023-07-23 08:00:54 +00:00
|
|
|
LOCAL_COMMIT=$(git rev-parse HEAD)
|
2023-07-23 03:49:40 +00:00
|
|
|
AKKOMA_BASE_IMAGE="registry.nrd.li/nrdli/akkoma-base:${AKKOMA_COMMIT}"
|
2023-07-23 08:00:54 +00:00
|
|
|
AKKOMA_FINAL_IMAGE="registry.nrd.li/nrdli/akkoma:${LOCAL_COMMIT}"
|
2023-07-23 03:49:40 +00:00
|
|
|
|
2023-07-23 08:17:35 +00:00
|
|
|
pushd akkoma
|
2023-07-23 03:49:40 +00:00
|
|
|
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}"
|