feat: add basic ci

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-08 15:50:47 +02:00
parent 9cd29a6b10
commit 67b2b14567
14 changed files with 2729 additions and 0 deletions

25
scripts/ci:pr.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -e
CMD_PREFIX="cargo run -p ci --"
CMD_PREFIX=""
if [[ -n "$CI_PREFIX" ]]; then
CMD_PREFIX="$CI_PREFIX"
else
cd ci || return 1
cargo build
cd - || return 1
CMD_PREFIX="ci/target/debug/ci"
fi
$CMD_PREFIX pull-request \
--docker-image "$DOCKER_IMAGE" \
--golang-builder-image "$GOLANG_BUILDER_IMAGE" \
--production-image "$PRODUCTION_IMAGE" \
--image "$REGISTRY/$SERVICE" \
--tag "main-$(date +%s)" \
--bin-name "$SERVICE"