forked from buzzert/smartbar
workflow: prefer runner os
This commit is contained in:
@@ -10,28 +10,31 @@ jobs:
|
|||||||
pdf:
|
pdf:
|
||||||
name: make pdf
|
name: make pdf
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: golang:1.22-bookworm
|
|
||||||
steps:
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Install Chromium and tools
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
set -euxo pipefail
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
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
|
make chromium ca-certificates fonts-liberation
|
||||||
rm -rf /var/lib/apt/lists/*
|
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
|
- name: Build PDF
|
||||||
run: make pdf
|
run: make pdf
|
||||||
|
|||||||
Reference in New Issue
Block a user