mirror of
https://gitea.0xace.cc/rust/github-release-bot.git
synced 2025-06-28 19:43:08 +00:00
first commit
This commit is contained in:
11
docker/Dockerfile
Normal file
11
docker/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM ekidd/rust-musl-builder as builder
|
||||
ADD --chown=rust:rust . ./
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/github-release-bot /opt/github-release-bot
|
||||
COPY ./docker/entrypoint.sh /opt/entrypoint.sh
|
||||
RUN chmod +x /opt/entrypoint.sh
|
||||
WORKDIR /opt
|
||||
ENTRYPOINT ["/opt/entrypoint.sh"]
|
20
docker/entrypoint.sh
Normal file
20
docker/entrypoint.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/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}
|
||||
|
Reference in New Issue
Block a user