From 8428dc9b1a20fb3b158235bea8b054a0651933ac Mon Sep 17 00:00:00 2001 From: Stephen Simpson Date: Mon, 24 Nov 2025 15:01:08 -0600 Subject: [PATCH] Refactor GitHub Actions workflow to build Docker image and run man page generation in container Signed-off-by: Stephen Simpson --- .github/workflows/build.yml | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ac6e8d..a550712 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,39 +25,26 @@ on: jobs: build: runs-on: ubuntu-latest - container: - image: rockylinux:9 steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install system dependencies + - name: Build Docker image run: | - dnf install -y \ - python3.11 \ - python3.11-pip \ - mandoc \ - rpm-build \ - dnf-plugins-core \ - git + docker build -t rocky-man:latest . - - name: Install UV + - name: Create output directories run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + mkdir -p ./html ./tmp - - name: Install Python dependencies + - name: Build man pages in container run: | - uv pip install --system -e . - - - name: Build man pages - run: | - python3.11 -m rocky_man.main \ - --versions ${{ github.event.inputs.versions || '8.10 9.5' }} \ - --output-dir ./html \ - --download-dir ./tmp/downloads \ - --extract-dir ./tmp/extracts \ + docker run --rm \ + -v "$(pwd)/html:/data/html" \ + -v "$(pwd)/tmp:/data/tmp" \ + rocky-man:latest \ + --versions ${{ github.event.inputs.versions || '8.10 9.6 10.0' }} \ --verbose env: PYTHONUNBUFFERED: 1