-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'Update Swagger doc' workflow #894
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Apply make swagger | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/core/**/**.go' | ||
- 'src/api/rest/server/**/**.go' | ||
jobs: | ||
update-swagger-doc: | ||
name: Update Swagger doc | ||
if: github.repository == 'cloud-barista/cb-tumblebug' | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
go-version: [ '1.17' ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 혹시, Go version을 1.17으로 버전업 하셨을까요? README의 실행 및 개발환경에 표기된 추천 Go version은 1.16으로 표기되어 있어 문의드립니다 ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hermitkim1 아직 버전업 하지 않았습니다. 최신 릴리스에서 1단계 정도 낮게 가져가고 있습니다. (그래서 1.16) 꼭 소스 구동 환경과 동일하게 맞출 필요는 없을 수도 있겠다는 생각입니다.. ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @computerphilosopher 기여해주신 1.17 유지해 주시고요 ^^ |
||
|
||
steps: | ||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- name: Install swag | ||
run: | | ||
go install github.com/swaggo/swag/cmd/swag@latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 버전을 명시하는 것이 좋을 것 같습니다 ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 저의 생각은.. 예를 들어 이 라인에 v1.7.0 으로 적혀 있는데 저는 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @computerphilosopher 께서 원하시는 방향으로 진행하시면 될 것 같습니다 😄 |
||
|
||
- name: Update Swagger doc | ||
run: | | ||
cd src | ||
make swag | ||
|
||
- name: Commit generated Swagger docs | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
file_pattern: src/api/rest/docs/** | ||
commit_message: Update Swagger docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기여해주신 워크플로우도 cb-tumblebug 리포지토리에서 동작하도록 제한할 필요성을 느낍니다 ^^
이유는 (본 워크플로우를 모르는) 기여자의 Forked repository에서 혹시라도 워크플로우가 수행되는 경우 Upstream와 forked간에 꼬이는 불상사를 방지하기 위함입니다.
Ref #895