From 5894e4594c14122fd520fbdc9d3addf7a681b03a Mon Sep 17 00:00:00 2001 From: Yannic Rieger Date: Sun, 9 May 2021 14:48:24 +0200 Subject: [PATCH] add build script --- .gitignore | 1 + Dockerfile | 4 +--- README.md | 8 +++++++- build.sh | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100755 build.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a6353d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.envrc diff --git a/Dockerfile b/Dockerfile index e23b37f..6560902 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,7 @@ RUN apt install -y git RUN apt install -y maven RUN git config --global user.email "machine@cow.network" RUN git config --global user.name "udder-machine" - -RUN git submodule update --init --recursive --depth 50 - +RUN git submodule update --init --recursive --depth 100 RUN ./Tuinity/tuinity jar RUN java -jar Tuinity/tuinity-paperclip.jar diff --git a/README.md b/README.md index 92de0f7..e1512b2 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,19 @@ Tuinity Docker ============== -Dockerize Tuinity server. +Dockerized Tuinity server. Build will be triggered when tagging this repository. The tag should look like `+` e.g `1.16.5+b12d0cce`. We will always use the last 8 digits of the commit sha from the Tuinity build. Since Docker does not support having `+` in the image name, the resulting image can pulled from `ghcr.io/cownetwork/tuinity:-` e.g `ghcr.io/cownetwork/tuinity:1.16.5-b12d0cce`. +Building +-------- + +Just checkout the repository and run `./build.sh`. You need to provide the environment variables `$GHCR_TOKEN` and `$GHCR_USER` so `docker login` can succeed. + + Future things ------------- diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..d16e970 --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +docker login ghcr.io -p $GHCR_TOKEN -u $GHCR_USER +docker build -t ghcr.io/cownetwork/tuinity:$1 . +docker push ghcr.io/cownetwork/tuinity:$1