Files
geo/.gitea/workflows/deploy-config-ci.yml
T
root e0b6c1a9fa ci(deploy): publish images via Gitea Registry and verify on CD
CI workflows now own image publishing: backend-ci and frontend-ci push
service images to the Gitea Registry tagged with commit8. CD workflows
(nas-compose-deploy, nas-compose-service-deploy, offline-package, the
new nas-k3s-deploy) pull and verify those tags instead of rebuilding,
so deployments fail fast when CI hasn't produced the matching image.
The shared deploy/scripts/gitea-registry-images.sh helper drives both
the ensure (CI) and verify (CD) paths, and package.sh can now hydrate
its local images from the registry via SOURCE_IMAGE_REGISTRY.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 23:54:33 +08:00

62 lines
1.6 KiB
YAML

name: Deployment Config CI
on:
push:
branches:
- main
paths:
- "deploy/**"
- "Dockerfile*"
- ".dockerignore"
- "server/Dockerfile"
- "server/.dockerignore"
pull_request:
branches:
- main
paths:
- "deploy/**"
- "Dockerfile*"
- ".dockerignore"
- "server/Dockerfile"
- "server/.dockerignore"
workflow_dispatch:
permissions:
contents: read
jobs:
deploy-config:
name: Deployment Config
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Docker CLI
run: |
if command -v docker >/dev/null 2>&1; then
docker --version
exit 0
fi
apt-get update
apt-get install -y docker.io docker-compose-plugin
- name: Validate compose files
run: |
docker compose -f deploy/docker-compose.yaml config >/tmp/compose.yaml
docker compose -f deploy/docker-compose.yaml -f deploy/docker-compose.offline.yaml config >/tmp/compose-offline.yaml
- name: Smoke build server runtime image
run: |
DOCKER_BUILDKIT=1 docker build \
--platform linux/amd64 \
--target runtime \
--build-arg SERVICE=tenant-api \
--tag geo-rankly/tenant-api:ci-smoke \
-f server/Dockerfile \
server/
docker image rm geo-rankly/tenant-api:ci-smoke >/dev/null 2>&1 || true
- name: Validate shell scripts
run: bash -n deploy/scripts/package.sh deploy/scripts/load-and-start.sh deploy/scripts/gitea-registry-images.sh