This commit is contained in:
@@ -10,28 +10,31 @@ jobs:
|
||||
pdf:
|
||||
name: make pdf
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: golang:1.22-bookworm
|
||||
steps:
|
||||
- name: Install Node 20 and Git
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends curl ca-certificates gnupg
|
||||
install -d -m 0755 /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends nodejs git
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go (from go.mod)
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
check-latest: true
|
||||
cache: true
|
||||
|
||||
- name: Install Chromium and tools
|
||||
run: |
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
make chromium ca-certificates fonts-liberation
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
set -euxo pipefail
|
||||
if command -v sudo >/dev/null 2>&1; then SUDO=sudo; else SUDO=; fi
|
||||
$SUDO apt-get update
|
||||
# Prefer chromium if available via apt (Debian/Ubuntu variants); fall back to chromium-browser if needed
|
||||
if apt-cache show chromium >/dev/null 2>&1; then
|
||||
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y --no-install-recommends \
|
||||
make chromium ca-certificates fonts-liberation
|
||||
else
|
||||
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y --no-install-recommends \
|
||||
make chromium-browser ca-certificates fonts-liberation || true
|
||||
fi
|
||||
$SUDO rm -rf /var/lib/apt/lists/*
|
||||
|
||||
- name: Build PDF
|
||||
run: make pdf
|
||||
|
||||
Reference in New Issue
Block a user