Skip to content

Commit

Permalink
Make GitHub Actions enforce that the rendered man page remains in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork authored and davidpolverari committed Oct 22, 2024
1 parent 2a935a2 commit b22c93b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/man_page_in_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Enforce that man/dcfldd.1 remains in sync

on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday 4pm
workflow_dispatch:

# Drop permissions to minimum for security
permissions:
contents: read

jobs:
man_page_in_sync:
runs-on: ubuntu-24.04
steps:

- uses: actions/checkout@v4

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends --yes -V \
txt2man
- name: Check man/dcfldd.1 for being in sync
run: |
set -x
cd man/
rm dcfldd.1 # so that create-man.sh has to close that very gap
./create-man.sh
git diff --exit-code # i.e. fail CI in case of a diff (and show it)

0 comments on commit b22c93b

Please sign in to comment.