mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-18 13:24:15 +00:00
check docs before a release
This commit is contained in:
parent
e8c8b54d52
commit
44ac16d49c
28
.github/workflows/check-docs.yml
vendored
Normal file
28
.github/workflows/check-docs.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Check Generated Docs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-docs:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.0.0
|
||||||
|
with:
|
||||||
|
go-version-file: src/go.mod
|
||||||
|
cache-dependency-path: src/go.sum
|
||||||
|
|
||||||
|
- name: Regenerate docs
|
||||||
|
working-directory: src
|
||||||
|
run: go run github.com/swaggo/swag/cmd/swag@v1.16.6 init --requiredByDefault
|
||||||
|
|
||||||
|
- name: Fail if docs are out of date
|
||||||
|
run: |
|
||||||
|
git diff --exit-code -- src/docs/docs.go src/docs/swagger.json src/docs/swagger.yaml
|
||||||
4
.github/workflows/release-dev-version.yml
vendored
4
.github/workflows/release-dev-version.yml
vendored
@ -11,8 +11,12 @@ permissions: {}
|
|||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-docs:
|
||||||
|
uses: ./.github/workflows/check-docs.yml
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
needs: check-docs
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||||
|
|||||||
@ -11,8 +11,12 @@ permissions: {}
|
|||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-docs:
|
||||||
|
uses: ./.github/workflows/check-docs.yml
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
needs: check-docs
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
||||||
|
|||||||
41
.github/workflows/update-generated-docs.yml
vendored
41
.github/workflows/update-generated-docs.yml
vendored
@ -1,41 +0,0 @@
|
|||||||
name: Update Generated Docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-docs:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: src/go.mod
|
|
||||||
cache-dependency-path: src/go.sum
|
|
||||||
|
|
||||||
- name: Regenerate docs
|
|
||||||
working-directory: src
|
|
||||||
run: go run github.com/swaggo/swag/cmd/swag@v1.16.6 init --requiredByDefault
|
|
||||||
|
|
||||||
- name: Create pull request for regenerated docs
|
|
||||||
uses: peter-evans/create-pull-request@v8
|
|
||||||
with:
|
|
||||||
branch: automation/update-generated-docs
|
|
||||||
delete-branch: true
|
|
||||||
commit-message: "chore: regenerate swagger docs"
|
|
||||||
title: "chore: regenerate swagger docs"
|
|
||||||
body: |
|
|
||||||
Update Swagger docs to match the latest changes in the main branch.
|
|
||||||
add-paths: |
|
|
||||||
src/docs/docs.go
|
|
||||||
src/docs/swagger.json
|
|
||||||
src/docs/swagger.yaml
|
|
||||||
Loading…
x
Reference in New Issue
Block a user