github-release-bot/docker/entrypoint.sh
2021-07-31 23:04:12 +03:00

21 lines
428 B
Bash

#!/bin/sh
set -e
if [[ -z "${TOKEN}" ]]; then
echo "Must set Telegram token"
exit 1
fi
if [[ -z "${CHATID}" ]]; then
echo "Must set Telegram chat id"
exit 1
fi
INTERVAL="${INTERVAL:-28800}"
SPREAD="${SPREAD:-600}"
CONFIG="${CONFIG:-config.yaml}"
DATADIR="${DATADIR:-data}"
/opt/github-release-bot --token ${TOKEN} --chatid ${CHATID} --interval ${INTERVAL} --spread ${SPREAD} --config ${CONFIG} --datadir ${DATADIR}