Created
May 4, 2022 13:55
-
-
Save guilhem/0538bc43b4b50a8df8a980516b99ea89 to your computer and use it in GitHub Desktop.
Github action to maintain swag docs up to date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: swagger | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- master | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
swagger: | |
name: docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- uses: supplypike/setup-bin@v1 | |
with: | |
uri: "https://github.com/swaggo/swag/releases/download/v1.7.6/swag_1.7.6_Linux_x86_64.tar.gz" | |
name: "swag" | |
version: "1.7.6" | |
- name: swag init | |
run: swag init | |
- name: git diff | |
run: git diff --no-ext-diff --quiet --exit-code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment