-
Notifications
You must be signed in to change notification settings - Fork 26
38 lines (36 loc) · 1.07 KB
/
build-openapi-bundle.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
name: Build OpenAPI bundle
on:
push:
branches:
- master
paths:
- 'core/standard/openapi/**.yaml'
jobs:
build-openapi-bundle:
name: Generate OpenAPI bundle
runs-on: ubuntu-latest
steps:
- name: Setup npm
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install -g @apidevtools/swagger-cli
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Generate OpenAPI bundle
run: |
cd core/standard/openapi
swagger-cli bundle -o /tmp/ogcapi-environmental-data-retrieval-1.bundled.json ogcapi-environmental-data-retrieval-1.yaml
- name: Commit changes and push
run: |
git config --global user.email "[email protected]"
git config --global user.name "Tom Kralidis"
mv -f /tmp/ogcapi-environmental-data-retrieval-1.bundled.json .
if [[ `git status --porcelain` ]]; then
git add .
git commit -am "Updating OpenAPI build"
git push
else
echo "No changes to push"
fi