Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 144b255

Browse files
committed
Add Build and Deploy OpenAPI configuration workflow
1 parent 78b042c commit 144b255

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Deploy OpenAPI configuration
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Configure git Credentials
17+
run: |
18+
git config user.name github-actions[bot]
19+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "lts/*"
23+
cache: "npm"
24+
cache-dependency-path: "./api/core/package-lock.json"
25+
- name: Install TypeSpec and compile project
26+
run: |
27+
cd ./api/src/core/
28+
npm install -g @typespec/compiler
29+
npm install
30+
tsp compile .
31+
- name: Commit OpenAPI specification to repository
32+
run: |
33+
cd ../../
34+
mv ./src/core/tsp-output/@typespec/openapi3/openapi.v1.0.yaml ./build/core-openapi3.yaml
35+
git add ./build/*
36+
git commit -m "[bot]update openapi3 schema"
37+
git push

0 commit comments

Comments
 (0)