forked from buzzert/smartbar
gitea workflow: try non ubuntu chrome
This commit is contained in:
@@ -21,22 +21,30 @@ jobs:
|
|||||||
check-latest: true
|
check-latest: true
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Install Chromium and tools
|
- name: Install Chrome and tools (no snap)
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
if command -v sudo >/dev/null 2>&1; then SUDO=sudo; else SUDO=; fi
|
if command -v sudo >/dev/null 2>&1; then SUDO=sudo; else SUDO=; fi
|
||||||
$SUDO apt-get update
|
$SUDO apt-get update
|
||||||
# Prefer chromium if available via apt (Debian/Ubuntu variants); fall back to chromium-browser if needed
|
# Base tools and fonts
|
||||||
if apt-cache show chromium >/dev/null 2>&1; then
|
|
||||||
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y --no-install-recommends \
|
||||||
make chromium ca-certificates fonts-liberation
|
ca-certificates gnupg make fonts-liberation
|
||||||
else
|
|
||||||
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y --no-install-recommends \
|
# Add Google's official Chrome APT repo (avoids Ubuntu's snap-only chromium)
|
||||||
make chromium-browser ca-certificates fonts-liberation || true
|
$SUDO install -d -m 0755 /etc/apt/keyrings
|
||||||
fi
|
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | $SUDO gpg --dearmor -o /etc/apt/keyrings/google-linux-signing-keyring.gpg
|
||||||
|
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-linux-signing-keyring.gpg] https://dl.google.com/linux/chrome/deb/ stable main" | \
|
||||||
|
$SUDO tee /etc/apt/sources.list.d/google-chrome.list >/dev/null
|
||||||
|
$SUDO apt-get update
|
||||||
|
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y --no-install-recommends google-chrome-stable
|
||||||
|
|
||||||
|
# Clean up apt lists to keep image lean
|
||||||
$SUDO rm -rf /var/lib/apt/lists/*
|
$SUDO rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
- name: Build PDF
|
- name: Build PDF
|
||||||
|
env:
|
||||||
|
# Ensure our tools pick Chrome first if multiple are present
|
||||||
|
CHROME_PATH: /usr/bin/google-chrome-stable
|
||||||
run: make pdf
|
run: make pdf
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
|||||||
Reference in New Issue
Block a user