mirror of
https://github.com/Noratrieb/vps.git
synced 2026-05-13 03:22:53 +02:00
update
This commit is contained in:
parent
f3aed2bf45
commit
131a282338
2 changed files with 2 additions and 79 deletions
77
ci/build.sh
77
ci/build.sh
|
|
@ -1,77 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
APP="$1"
|
|
||||||
|
|
||||||
if [ "$APP" = "hugo-chat" ]; then
|
|
||||||
REPO="https://github.com/C0RR1T/HugoChat.git"
|
|
||||||
elif [ "$APP" = "cors" ]; then
|
|
||||||
REPO="https://github.com/noratrieb-lehre/davinci-cors.git"
|
|
||||||
else
|
|
||||||
REPO="https://github.com/Noratrieb/$APP.git"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Checking out $REPO"
|
|
||||||
git clone "$REPO" ../app
|
|
||||||
cd ../app
|
|
||||||
|
|
||||||
CURRENT_COMMIT=$(git rev-parse HEAD | cut -c1-8)
|
|
||||||
echo "Latest commit of $APP is $CURRENT_COMMIT"
|
|
||||||
|
|
||||||
echo "**Commit: \`$CURRENT_COMMIT\`**" >> "$GITHUB_STEP_SUMMARY"
|
|
||||||
|
|
||||||
if [ "$APP" = "hugo-chat" ]; then
|
|
||||||
IMAGE_PREFIX="docker.noratrieb.dev/hugo-chat"
|
|
||||||
SERVER_FULL_NAME="$IMAGE_PREFIX-server:$CURRENT_COMMIT"
|
|
||||||
CLIENT_FULL_NAME="$IMAGE_PREFIX-client:$CURRENT_COMMIT"
|
|
||||||
|
|
||||||
pushd ./HugoServer
|
|
||||||
echo "Building server"
|
|
||||||
docker build . -t "$SERVER_FULL_NAME"
|
|
||||||
docker push "$SERVER_FULL_NAME"
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd ./hugo-client
|
|
||||||
echo "Building client"
|
|
||||||
docker build . -t "$CLIENT_FULL_NAME"
|
|
||||||
docker push "$CLIENT_FULL_NAME"
|
|
||||||
popd
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$APP" = "cors" ]; then
|
|
||||||
IMAGE_PREFIX="docker.noratrieb.dev/cors-school"
|
|
||||||
SERVER_FULL_NAME="$IMAGE_PREFIX-server:$CURRENT_COMMIT"
|
|
||||||
CLIENT_FULL_NAME="$IMAGE_PREFIX-client:$CURRENT_COMMIT"
|
|
||||||
BOT_FULL_NAME="$IMAGE_PREFIX-bot:$CURRENT_COMMIT"
|
|
||||||
|
|
||||||
pushd ./react-frontend
|
|
||||||
echo "Building frontend"
|
|
||||||
docker build -t "$CLIENT_FULL_NAME" .
|
|
||||||
docker push "$CLIENT_FULL_NAME"
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd ./rust
|
|
||||||
echo "Building server"
|
|
||||||
docker build -t "$SERVER_FULL_NAME" -f Dockerfile.server .
|
|
||||||
docker push "$SERVER_FULL_NAME"
|
|
||||||
|
|
||||||
echo "Building bot"
|
|
||||||
docker build -t "$BOT_FULL_NAME" -f Dockerfile.bot .
|
|
||||||
docker push "$BOT_FULL_NAME"
|
|
||||||
popd
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$APP" = "dockerolat" ]; then
|
|
||||||
APP="openolat"
|
|
||||||
fi
|
|
||||||
|
|
||||||
IMAGE_PREFIX="docker.noratrieb.dev/$APP"
|
|
||||||
IMAGE_FULL_NAME="$IMAGE_PREFIX:$CURRENT_COMMIT"
|
|
||||||
|
|
||||||
docker build . -t "$IMAGE_FULL_NAME"
|
|
||||||
docker push "$IMAGE_FULL_NAME"
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"nixos-25.11": {
|
"nixos-25.11": {
|
||||||
"lastUpdated": "2026-04-15T19:50:47.947Z",
|
"lastUpdated": "2026-05-10T14:35:41.703Z",
|
||||||
"commit": "7e495b747b51f95ae15e74377c5ce1fe69c1765f"
|
"commit": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue