Files
dependabot[bot] b289ee16cb build(deps): bump actions/checkout from 6 to 7 (#4068)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-18 19:21:39 +05:30

57 lines
1.8 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@v7
with:
repository: gravitl/netmaker
ref: ${{ github.event.inputs.branch || 'master' }}
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Install Swag
run: go install github.com/swaggo/swag/cmd/swag@latest
- name: Install swagger
run: go install github.com/go-swagger/go-swagger/cmd/swagger@latest
- name: Generating Docs
run: |
export PATH=$PATH:$(go env GOPATH)/bin
swag i --md docs/ --parseDependency --parseInternal --outputTypes yaml --parseDepth 1 --output .
- name: Validate Swagger File
run: swagger validate ./swagger.yaml
- 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@v8
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