From 11c10497ce79e6cbf680808e650f078536cb0408 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 26 Aug 2023 22:18:42 +0200 Subject: [PATCH] support building hugochat --- .github/workflows/deploy.yaml | 1 + ci/build.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7bf06cc..9713c6d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -10,6 +10,7 @@ on: - widetom - cargo-bisect-rustc-service - killua-bot + - hugo-chat jobs: build: diff --git a/ci/build.sh b/ci/build.sh index b206383..0c7b479 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -4,6 +4,28 @@ set -eu APP="$1" +if [ "$APP" = "hugo-chat" ]; then + git clone "https://github.com/C0RR1T/HugoChat.git" ../app + cd ../app + + CURRENT_COMMIT=$(git rev-parse HEAD | cut -c1-8) + echo "Latest commit of $APP is $CURRENT_COMMIT" + + IMAGE_PREFIX="docker.nilstrieb.dev/hugo-chat" + SERVER_FULL_NAME="$IMAGE_PREFIX-server:$CURRENT_COMMIT" + CLIENT_FULL_NAME="$IMAGE_PREFIX-client:$CURRENT_COMMIT" + + cd ./HugoServer + echo "Building server" + docker build . -t "$SERVER_FULL_NAME" + docker push "$SERVER_FULL_NAME" + + cd ../hugo-client + echo "Building client" + docker build . -t "$CLIENT_FULL_NAME" + docker push "$CLIENT_FULL_NAME" +fi + echo "Checking out $APP" git clone "https://github.com/Nilstrieb/$APP.git" ../app