Some checks failed
CI — P2 Drift (Go + Node) / saas (push) Successful in 24s
CI — P2 Drift (Go + Node) / agent (push) Successful in 53s
CI — P3 Alert / test (push) Successful in 27s
CI — P5 Cost / test (push) Successful in 23s
CI — P4 Portal / test (push) Successful in 37s
CI — P6 Run / saas (push) Successful in 25s
CI — P2 Drift (Go + Node) / build-push (push) Failing after 17s
CI — P3 Alert / build-push (push) Failing after 17s
CI — P5 Cost / build-push (push) Failing after 11s
CI — P4 Portal / build-push (push) Failing after 14s
CI — P6 Run / build-push (push) Failing after 13s
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: CI — P4 Portal
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ['products/04-lightweight-idp/**']
|
|
pull_request:
|
|
paths: ['products/04-lightweight-idp/**']
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
- name: Install deps
|
|
run: cd $GITHUB_WORKSPACE/products/04-lightweight-idp && npm ci --include=dev
|
|
|
|
- name: Type check
|
|
run: cd $GITHUB_WORKSPACE/products/04-lightweight-idp && ./node_modules/.bin/tsc --noEmit
|
|
|
|
- name: Test
|
|
run: cd $GITHUB_WORKSPACE/products/04-lightweight-idp && npm test
|
|
|
|
|
|
build-push:
|
|
runs-on: ubuntu-24.04
|
|
needs: test
|
|
if: github.ref == 'refs/heads/main'
|
|
steps:
|
|
- name: Checkout
|
|
run: git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
|
|
- name: Build and push
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/products
|
|
docker build -t 192.168.86.11:30095/dd0c-portal:latest ./04-lightweight-idp
|
|
docker push 192.168.86.11:30095/dd0c-portal:latest
|
|
- name: Deploy
|
|
run: cd $GITHUB_WORKSPACE/products && docker compose pull portal && docker compose up -d portal
|