generated from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 29
38 lines (36 loc) · 1.3 KB
/
swagger.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: Open API Specification and Documentation
on:
push:
branches:
- 'master'
paths:
- 'handlers/**'
jobs:
swaggerci:
if: github.repository == 'meshery/meshery'
name: swagger-docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: "master"
- name: Setup go-swagger
uses: minchao/setup-go-swagger@v1
with:
version: v0.26.1
- name: swagger-spec
run: swagger generate spec -o ./server/helpers/swagger.yaml --scan-models
- name: swagger-docs
run: swagger generate spec -o ./docs/_data/swagger.yml --scan-models && swagger flatten ./docs/_data/swagger.yml -o ./docs/_data/swagger.yml --with-expand --format=yaml
- name: Pull changes from remote
run: git pull origin master
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: docs server/helpers/
commit_user_name: l5io
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: '--signoff'
commit_message: "[Docs] Updated swagger docs for REST API"