Files
James Wampler 44f722019b
CI / build-and-push (push) Successful in 58s
CI / deploy (push) Successful in 10s
Mirror mic-check's Gitea/GitHub CI-CD pipeline for novelly
Dual-engine workflow (.github/workflows/ci.yml, read by both GitHub Actions
and Gitea Actions): build, test, coverage badge on every push; on Gitea main
pushes only, build+push API/web images to the Gitea registry and redeploy
the persistent LAN stack via the shared [self-hosted, qa] runner. Replaces
the ad hoc docker-compose.deploy.yml manual workflow with
deploy/qa/docker-compose.qa.yml, pulled by CI — data volume preserved
across deploys (no -v on down), unlike mic-check's throwaway QA stack.
2026-08-18 18:25:01 -07:00

26 lines
780 B
Bash
Executable File

#!/usr/bin/env bash
# Builds the API and web images and tags them with both the current git sha and
# "latest" (the tag the deploy compose stack pulls). Both Dockerfiles are already
# self-contained multi-stage builds (used directly by docker-compose.deploy.yml today),
# so no separate CI-only Dockerfile variant is needed.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh
cd "$CI_ROOT"
image_names
log "Building $API_IMAGE:$GIT_SHA / :latest"
docker build \
-f src/Novelly.Api/Dockerfile \
-t "$API_IMAGE:$GIT_SHA" \
-t "$API_IMAGE:latest" \
.
log "Building $WEB_IMAGE:$GIT_SHA / :latest"
docker build \
-f src/Novelly.Web/Dockerfile \
-t "$WEB_IMAGE:$GIT_SHA" \
-t "$WEB_IMAGE:latest" \
src/Novelly.Web
log "docker-build.sh complete"