init: CasSsoService CAS 5.3 overlay (cas.war via LFS)

This commit is contained in:
chenxing
2026-08-05 09:53:49 +08:00
commit 3bd14554ec
93 changed files with 19827 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
name: deploy-cassso-service
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
# docker:24 自带 docker CLI;宿主 docker.sock 默认挂入 job 容器。
container:
image: docker:24
steps:
- name: Install git + git-lfs (alpine)
run: apk add --no-cache git git-lfs
- name: Checkout (manual, internal Gitea) + LFS pull
# cas.war (174MB) 走 Git LFS 存储,clone 后需 git lfs pull 取回真实文件
run: |
git clone --depth 1 --branch main http://192.168.10.160:3000/${GITHUB_REPOSITORY}.git /tmp/src
cd /tmp/src && git lfs pull
cp -a /tmp/src/. .
rm -rf .git .gitea
rm -rf /tmp/src
- name: Login to Nexus docker registry
run: echo '${{ secrets.NEXUS_PASSWORD }}' | docker login -u '${{ secrets.NEXUS_USER }}' --password-stdin nexus:8083
- name: Build image (copies docker/cas.war)
run: docker build -f docker/Dockerfile -t nexus:8083/docker-hosted/cassso-service:latest .
- name: Push image
run: docker push nexus:8083/docker-hosted/cassso-service:latest
- name: Deploy on host (infra-infra-net, CAS 端口 8443)
run: |
docker rm -f cas-sso 2>/dev/null || true
docker run -d --name cas-sso --network infra-infra-net -p 8443:8443 --restart unless-stopped nexus:8083/docker-hosted/cassso-service:latest
- name: Done
run: 'echo "CasSsoService deployed -> https://192.168.10.160:8443/login"'