Skip to content

Generate docs

Generate docs #10

Workflow file for this run

name: Generate docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'src/Microsoft.Sbom.Api/Config/Args/*.cs'
- 'src/Microsoft.Sbom.Common/Config/IConfiguration.cs'
permissions:
contents: write
jobs:
gen-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
- name: Generate docs
run: |
# Run CLI
dotnet run -p src/Microsoft.Sbom.Tool generate -- -h 2> help.txt || true
cat <<EOF > docs/sbom-tool-arguments.md
# Sbom tool arguments
\`\`\`shell
dotnet run -p './src/Microsoft.Sbom.Tool' generate -- -h
\`\`\`
\`\`\`
$(tail --lines=+4 help.txt)
\`\`\`
EOF
- name: Commit
uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
with:
commit_message: 'Auto update docs/*.md'
file_pattern: 'docs/*.md'