-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1 KB
/
Copy pathdocs.yml
File metadata and controls
37 lines (32 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Docs
on:
push:
branches: [ master ]
paths: &shared_paths
- 'MANUAL.md'
- 'ncmail.1'
- '.github/workflows/docs.yml'
pull_request:
branches: [ master ]
paths: *shared_paths
jobs:
manpage:
name: ncmail.1 in sync with MANUAL.md
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: stable
# Pin go-md2man so the check matches the version that generated ncmail.1;
# a distro-packaged version could format differently and false-fail.
- name: Install go-md2man
run: go install github.com/cpuguy83/go-md2man/v2@v2.0.7
- name: Regenerate ncmail.1 and compare
run: |
"$(go env GOPATH)/bin/go-md2man" -in MANUAL.md -out ncmail.1.regen
if ! diff -u ncmail.1 ncmail.1.regen; then
echo "::error file=ncmail.1::ncmail.1 is out of sync with MANUAL.md."
echo "Regenerate with: go-md2man -in MANUAL.md -out ncmail.1"
exit 1
fi