Skip to content

Instantly share code, notes, and snippets.

@guilhem
Created May 4, 2022 13:55
Show Gist options
  • Save guilhem/0538bc43b4b50a8df8a980516b99ea89 to your computer and use it in GitHub Desktop.
Save guilhem/0538bc43b4b50a8df8a980516b99ea89 to your computer and use it in GitHub Desktop.
Github action to maintain swag docs up to date
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