mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-21 12:34:29 +08:00
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: Generate Documentation
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: 'Branch to run the workflow against'
|
|
required: true
|
|
default: 'master'
|
|
|
|
jobs:
|
|
generate-docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: gravitl/netmaker
|
|
ref: ${{ github.event.inputs.branch || 'master' }}
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Install Swag
|
|
run: go install github.com/swaggo/swag/cmd/swag@latest
|
|
|
|
- name: Generating Docs
|
|
run: |
|
|
export PATH=$PATH:$(go env GOPATH)/bin
|
|
swag i --md docs/ --parseDependency --parseInternal --outputTypes yaml --parseDepth 1 --output .
|
|
|
|
- name: Get current timestamp
|
|
id: timestamp
|
|
run: echo "timestamp=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: "Update documentation ${{ steps.timestamp.outputs.timestamp }}"
|
|
title: "Update Swagger documentation ${{ steps.timestamp.outputs.timestamp }}"
|
|
body: |
|
|
This PR updates the swagger.yml file with the latest documentation changes.
|
|
|
|
Updated on: ${{ steps.timestamp.outputs.timestamp }}
|
|
branch: update-swagger-docs-${{ github.event.inputs.branch }}
|
|
base: ${{ github.event.inputs.branch }}
|
|
delete-branch: true
|