devOpsManual/.gitea/workflows/build-manual.yaml
carmen-cortese 1b2f416b60 Pin manual build Node.js to major version 24
Alpine removed nodejs 24.18.1-r0, so the exact pin broke the build on
main. Accept any 24.x release and log the version used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:41:32 -05:00

37 lines
1.6 KiB
YAML

name: Build DevOps Manual PDF
on:
push:
branches: [main, chapter3-validation]
jobs:
build-pdf:
runs-on: texlive
container:
image: ghcr.io/xu-cheng/texlive-full@sha256:c06416ebbc69c8e90e07d1f1a6f7a3f9b334e773daa3543ce879ea533317c3a7
options: --memory=1g --cpus=1
env:
BUILD_SHA: ${{ gitea.sha }}
BUILD_RUN: ${{ gitea.run_number }}
steps:
- name: Prepare recorded Actions runtime
# Alpine removes superseded patch releases, so pin the major version and log the exact one.
run: apk add --no-cache 'nodejs~24' && node --version
- name: Check out triggering revision
uses: https://github.com/actions/checkout@v3.6.0
with:
persist-credentials: false
- name: Generate visible build metadata
run: |
python3 -c 'import os,pathlib; s=os.environ["BUILD_SHA"][:7]; r=os.environ["BUILD_RUN"]; assert s.isalnum() and r.isdigit(); pathlib.Path("build_meta.tex").write_text(chr(92)+"newcommand{"+chr(92)+"buildCommit}{"+s+"}"+chr(10)+chr(92)+"newcommand{"+chr(92)+"buildRun}{"+r+"}"+chr(10))'
cat build_meta.tex
- name: Compile and require nonempty PDF
run: |
latexmk -pdf -interaction=nonstopmode -halt-on-error -file-line-error devopsAssignment.tex
test -s devopsAssignment.pdf
- name: Upload versioned PDF
uses: https://github.com/actions/upload-artifact@v3.1.3
with:
name: devops-manual-build-${{ gitea.run_number }}-${{ gitea.sha }}
path: devopsAssignment.pdf
if-no-files-found: error
retention-days: 30