tailscale/.github/workflows
Brad Fitzpatrick a7d8aeb8ae misc/genreadme,tempfork/pkgdoc,tsnet: generate README.md files from godoc
Adds a CI check to keep opted-in directories' README.md files in sync
with their package godoc. For now tsnet (and its sub-packages under
tsnet/example) is the only opted-in tree. The list of directories
lives in misc/genreadme/genreadme.go as defaultRoots, so CI and humans
both just run `./tool/go run ./misc/genreadme` with no arguments.

The check piggybacks on the existing go_generate job in test.yml and
fails if any README.md is out of date, pointing the user at the same
command.

Along the way:

 - tempfork/pkgdoc now emits Markdown instead of plain text: headings
   become level-2 with no {#hdr-...} anchors, and [Symbol] doc links
   resolve to pkg.go.dev URLs, including for symbols in the current
   package (which the default Printer would otherwise emit as bare
   #Name fragments with no backing anchor in a README). Parsing no
   longer uses parser.ImportsOnly, so doc.Package knows the package's
   symbols and can resolve [Symbol] links at all.

 - genreadme also emits a pkg.go.dev Go Reference badge at the top of
   a library package's README; suppressed for package main.

 - tsnet/tsnet.go's package godoc is expanded in idiomatic godoc
   syntax — [Type], [Type.Method], reference-style [link]: URL
   definitions — rather than Markdown-flavored [text](url) or
   backtick-quoted identifiers, so that both pkg.go.dev and the
   generated README.md render cleanly from a single source.

Fixes #19431
Fixes #19483
Fixes #19470

Change-Id: I8ca37e9e7b3bd446b8bfa7a91ac548f142688cb1
Co-authored-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Signed-off-by: Walter Poupore <walterp@tailscale.com>
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-04-22 15:13:09 -07:00
..
checklocks.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
cigocacher.yml .github: Bump actions/download-artifact from 8.0.0 to 8.0.1 2026-03-27 14:55:59 +00:00
codeql-analysis.yml .github: Bump github/codeql-action from 4.32.6 to 4.34.1 2026-03-23 15:53:31 +00:00
docker-base.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
docker-file-build.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
flakehub-publish-tagged.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
golangci-lint.yml go.toolchain.branch: switch to Go 1.26 2026-03-04 21:57:05 -08:00
govulncheck.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
installer.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
kubemanifests.yaml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
natlab-integrationtest.yml tstest/integration/nat, tstest/natlab/vnet: fix natlab test flake 2026-04-13 16:34:15 -07:00
pin-github-actions.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00
request-dataplane-review.yml .github: Bump actions/create-github-app-token from 2.2.1 to 3.0.0 (#19003) 2026-03-26 10:08:56 -04:00
ssh-integrationtest.yml ssh/tailssh: speed up SSH integration tests 2026-04-13 14:18:27 -07:00
test.yml misc/genreadme,tempfork/pkgdoc,tsnet: generate README.md files from godoc 2026-04-22 15:13:09 -07:00
update-flake.yml .github: Bump actions/create-github-app-token from 2.2.1 to 3.0.0 (#19003) 2026-03-26 10:08:56 -04:00
update-webclient-prebuilt.yml .github: Bump actions/create-github-app-token from 2.2.1 to 3.0.0 (#19003) 2026-03-26 10:08:56 -04:00
vet.yml cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
webclient.yml .github: bump actions/checkout from 6.0.1 to 6.0.2 2026-02-23 08:44:40 -07:00