This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (61 loc) · 2.01 KB
/
node-server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build Knight-Light NodeJS Server
run-name: "Build Knight-Light NodeJS Server: ${{ github.event.head_commit.message }}"
on: [push, workflow_dispatch]
jobs:
code-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: |
cd node-server
npm ci
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Test with Node
run: |
cd node-server
npm ci
npm run test:unit
workflow_engine:
runs-on: ubuntu-latest
name: Run Workflow Engine
steps:
- uses: actions/checkout@v4
- id: vars
run: |
echo full_image_tag="ttl.sh/$(cat /proc/sys/kernel/random/uuid):30m" >> $GITHUB_OUTPUT
echo full_bundle_tag="ttl.sh/$(cat /proc/sys/kernel/random/uuid):30m" >> $GITHUB_OUTPUT
- name: Run Workflow Engine
uses: cms-enterprise/batcave-workflow-engine-action/image-build-scan-publish/docker@main
with:
build_dir: "node-server"
dockerfile: "node-server/Dockerfile"
tag: ${{ steps.vars.outputs.full_image_tag }}
bundle_publish_tag: ${{ steps.vars.outputs.full_bundle_tag }}
deploy_impl:
runs-on: ubuntu-latest
needs: workflow_engine
steps:
- name: Clone Manifest
uses: actions/checkout@v4
with:
repository: CMS-Enterprise/batcave-knight-light-manifest
ssh-key: ${{ secrets.MANIFEST_DEPLOY_TOKEN }}
- uses: gatecheckdev/deploykit-action/kustomize@main
with:
image: ${{ needs.workflow_engine.outputs.full_image_tag }}
directory: "."
service: "knight-light-server-nodejs"
service_directory: "impl"
manifest_deploy_token: ${{ secrets.MANIFEST_DEPLOY_TOKEN }}