Refactor GitHub Actions workflow to build Docker image and run man page generation in container

Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
Stephen Simpson
2025-11-24 15:01:08 -06:00
parent 71334aca77
commit 8428dc9b1a

View File

@@ -25,39 +25,26 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: rockylinux:9
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install system dependencies - name: Build Docker image
run: | run: |
dnf install -y \ docker build -t rocky-man:latest .
python3.11 \
python3.11-pip \
mandoc \
rpm-build \
dnf-plugins-core \
git
- name: Install UV - name: Create output directories
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh mkdir -p ./html ./tmp
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Python dependencies - name: Build man pages in container
run: | run: |
uv pip install --system -e . docker run --rm \
-v "$(pwd)/html:/data/html" \
- name: Build man pages -v "$(pwd)/tmp:/data/tmp" \
run: | rocky-man:latest \
python3.11 -m rocky_man.main \ --versions ${{ github.event.inputs.versions || '8.10 9.6 10.0' }} \
--versions ${{ github.event.inputs.versions || '8.10 9.5' }} \
--output-dir ./html \
--download-dir ./tmp/downloads \
--extract-dir ./tmp/extracts \
--verbose --verbose
env: env:
PYTHONUNBUFFERED: 1 PYTHONUNBUFFERED: 1