diff --git a/.github/actions/generate-swagger/action.yml b/.github/actions/generate-swagger/action.yml new file mode 100644 index 0000000000..36062105fb --- /dev/null +++ b/.github/actions/generate-swagger/action.yml @@ -0,0 +1,9 @@ +name: generate swagger +description: generate swagger files based on protobuf +runs: + using: "composite" + steps: + - run: make proto-swagger-gen + shell: sh + - run: make update-swagger-docs + shell: sh diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 832fa81d63..4bc042d66c 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -19,6 +19,17 @@ jobs: extensions: 'proto' clangFormatVersion: 12 inplace: True + swagger: + name: check generated swagger files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.2.0 + with: + go-version: 1.15 + - uses: ./.github/actions/generate-swagger + - run: git diff-index --quiet HEAD + # TODO ebony: release comment after merging initial proto files to v2 branch # breakage: # runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 36471f28e9..e5486ee562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,4 +47,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Build, CI +* (ci) [\#457](https://github.com/line/lbm-sdk/pull/457) add swagger check + ### Document Updates