ci: build container and publish to the gitgudlab registry Builds the SillyTavern image via docker:dind and pushes :latest plus a short-sha tag to the instance registry; the unraid container already pulls from that ref, so CA auto-update picks up new builds.

aa7fb58b09113aabbcb68c044eb270d608e84ef5

permissionBRICK <christoph.ambrosch@live.at>

1 files changed, +20 -0Showing whitespace changes
.gitlab-ci.yml+20 -0
@@ -0,0 +1,20 @@
1+stages:
2+ - build
3+
4+build-image:
5+ stage: build
6+ image: docker:latest
7+ services:
8+ - name: docker:dind
9+ alias: docker
10+ command: ["sh", "-c", "DOCKER_TLS_CERTDIR='' exec dockerd-entrypoint.sh"]
11+ variables:
12+ DOCKER_HOST: tcp://docker:2375
13+ script:
14+ - for i in $(seq 1 60); do docker info >/dev/null 2>&1 && break; sleep 1; done
15+ - docker info >/dev/null
16+ - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
17+ - docker pull "$CI_REGISTRY_IMAGE:latest" || true
18+ - docker build --cache-from "$CI_REGISTRY_IMAGE:latest" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" -t "$CI_REGISTRY_IMAGE:latest" .
19+ - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
20+ - docker push "$CI_REGISTRY_IMAGE:latest"