add gateway (#187)

* feature: add gateway
This commit is contained in:
hefanli
2025-12-22 15:41:17 +08:00
committed by GitHub
parent 46f4a8c219
commit e5b28c26b1
41 changed files with 706 additions and 291 deletions

View File

@@ -0,0 +1,30 @@
name: Gateway Docker Image CI
on:
push:
branches: [ "main" ]
paths:
- 'backend/**'
- 'scripts/images/gateway/**'
- '.github/workflows/docker-image-gateway.yml'
- '.github/workflows/docker-images-reusable.yml'
pull_request:
branches: [ "main" ]
paths:
- 'backend/**'
- 'scripts/images/gateway/**'
- '.github/workflows/docker-image-gateway.yml'
- '.github/workflows/docker-images-reusable.yml'
workflow_dispatch:
workflow_call:
jobs:
call-docker-build:
name: Build and Push Gateway Docker Image
uses: ./.github/workflows/docker-images-reusable.yml
permissions:
contents: read
packages: write
with:
service_name: gateway
build_dir: .

View File

@@ -14,6 +14,13 @@ jobs:
service_name: frontend
build_dir: .
gateway:
name: Gateway Image
uses: ./.github/workflows/docker-images-reusable.yml
with:
service_name: gateway
build_dir: .
backend:
name: Backend Image
uses: ./.github/workflows/docker-images-reusable.yml

View File

@@ -18,6 +18,15 @@ jobs:
secrets:
HUAWEI_CLOUD_SWR_LOGIN_PWD: ${{ secrets.HUAWEI_CLOUD_SWR_LOGIN_PWD}}
gateway:
name: Push Gateway Image
uses: ./.github/workflows/docker-push-to-huaweicloud-reusable.yml
with:
service_name: datamate-gateway
version: ${{ inputs.version}}
secrets:
HUAWEI_CLOUD_SWR_LOGIN_PWD: ${{ secrets.HUAWEI_CLOUD_SWR_LOGIN_PWD}}
backend:
name: Push Backend Image
uses: ./.github/workflows/docker-push-to-huaweicloud-reusable.yml

View File

@@ -61,7 +61,7 @@ jobs:
run: |
mkdir -p images/datamate
LOWERCASE_REPO=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
services=("runtime" "backend" "frontend" "database" "backend-python")
services=("runtime" "backend" "frontend" "database" "backend-python" "gateway")
for service in "${services[@]}"; do
docker pull ghcr.io/$LOWERCASE_REPO/datamate-$service:latest --platform arm64
docker tag ghcr.io/$LOWERCASE_REPO/datamate-$service:latest datamate-$service:latest

View File

@@ -34,6 +34,12 @@ jobs:
with:
service_name: backend-python
gateway-docker-build:
name: Build and Push Frontend Docker Image
uses: ./.github/workflows/docker-image-save.yml
with:
service_name: gateway
package-all:
needs:
- backend-docker-build
@@ -41,6 +47,7 @@ jobs:
- database-docker-build
- backend-python-docker-build
- runtime-docker-build
- gateway-docker-build
runs-on: ubuntu-latest
steps:
- name: Checkout