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:
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user