diff --git a/.env.sample b/.env.sample index 82e864e..11b72dd 100644 --- a/.env.sample +++ b/.env.sample @@ -6,6 +6,8 @@ COMPOSE_FILE="compose.yml" # **NOTE** Please change this value to your repo HUGO_GIT_URL=git@codeberg.org:eotl/example-repo.git +# set the used Hugo version optionally, otherwise the version defined in site-badger is used +#HUGO_VERSION=0.143.1 # HTTP Basic Auth protected /deploy endpoint #COMPOSE_FILE="$COMPOSE_FILE:compose.auth.yml" diff --git a/abra.sh b/abra.sh index bbe239c..4fa4798 100644 --- a/abra.sh +++ b/abra.sh @@ -1,5 +1,5 @@ export APP_ENTRYPOINT_VERSION=v1 -export BADGER_ENTRYPOINT_VERSION=v1 +export BADGER_ENTRYPOINT_VERSION=v2 export DEFAULT_CONF_VERSION=v1 export SSH_CONF_VERSION=v1 export SSH_DEPLOY_KEY_VERSION=v1 diff --git a/badger-entrypoint.sh.tmpl b/badger-entrypoint.sh.tmpl index 73c7b78..d2f7562 100644 --- a/badger-entrypoint.sh.tmpl +++ b/badger-entrypoint.sh.tmpl @@ -2,6 +2,16 @@ set -e +BIN_TARGET=/usr/local/bin + +if [[ -z "$HUGO_VERSION" ]]; then + echo "do not use custom hugo version" +else + echo "installing hugo version $HUGO_VERSION" + curl -o hugo.tgz --fail -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" && \ + tar xvzf hugo.tgz -C $BIN_TARGET +fi + {{ if eq (env "PRIVATE_ENABLED") "1" }} eval $(ssh-agent -s) ssh-add /root/.ssh/deploy diff --git a/compose.yml b/compose.yml index 33e1ecc..06c7b8c 100644 --- a/compose.yml +++ b/compose.yml @@ -29,7 +29,7 @@ services: - "coop-cloud.${STACK_NAME}.version=v0.2.0+1.25.3-alpine" badger: - image: codeberg.org/eotl/site-badger:0.1.0 + image: codeberg.org/eotl/site-badger:0.2.0 environment: - CUSTOM_DEPLOY_ENABLED - CUSTOM_DEPLOY_SCRIPT @@ -37,6 +37,7 @@ services: - HUGO_GIT_BRANCH - HUGO_PUBLIC_DIR=/usr/share/nginx/website - HUGO_WORKING_DIR=/root/website + - HUGO_VERSION - PRIVATE_ENABLED - WHD_SCRIPTS=/root/scripts command: webhookd