Compare commits
3 Commits
v2025.5.8
...
f5e9a950be
Author | SHA1 | Date | |
---|---|---|---|
f5e9a950be | |||
b32412314d | |||
8b57dff8d4 |
68
.github/workflows/build.yml
vendored
68
.github/workflows/build.yml
vendored
@@ -1,68 +0,0 @@
|
|||||||
name: Build images
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- showpiece
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build_images:
|
|
||||||
name: Build images
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 120
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
env:
|
|
||||||
DEPLOY: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: https://github.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Apply patches
|
|
||||||
run: ./runtime-patches.sh
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update &&
|
|
||||||
sudo apt-get install -y qemu-user-static quilt debootstrap libarchive-tools arch-test binfmt-support
|
|
||||||
|
|
||||||
- name: Setup binfmt_misc
|
|
||||||
run: |
|
|
||||||
ls /proc/sys/fs/binfmt_misc/ || true
|
|
||||||
sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true
|
|
||||||
sudo update-binfmts --enable qemu-aarch64
|
|
||||||
|
|
||||||
- name: Run build process
|
|
||||||
run: |
|
|
||||||
sudo ./build.sh &&
|
|
||||||
sudo mv deploy/*-arm64-standalone.img deploy/showpieceos-arm64-standalone.img &&
|
|
||||||
sudo mv deploy/*-arm64-client.img deploy/showpieceos-arm64-client.img
|
|
||||||
|
|
||||||
- name: Compress images
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
run: ./compress-images.sh
|
|
||||||
|
|
||||||
- name: Publish client
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
uses: https://github.com/softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref_name }}
|
|
||||||
name: ${{ github.ref_name }}
|
|
||||||
files: deploy/*-client.img.gz
|
|
||||||
|
|
||||||
- name: Publish standalone
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
uses: https://github.com/softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref_name }}
|
|
||||||
name: ${{ github.ref_name }}
|
|
||||||
files: deploy/*-standalone.img.gz
|
|
||||||
|
|
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
for img in "deploy/"*.img; do
|
|
||||||
gzip -4 -v -k "$img"
|
|
||||||
done
|
|
7
config
7
config
@@ -13,10 +13,3 @@ FIRST_USER_PASS="letmein"
|
|||||||
DISABLE_FIRST_BOOT_USER_RENAME=1
|
DISABLE_FIRST_BOOT_USER_RENAME=1
|
||||||
WPA_COUNTRY=US
|
WPA_COUNTRY=US
|
||||||
ENABLE_SSH=0
|
ENABLE_SSH=0
|
||||||
STAGE_LIST=""
|
|
||||||
for d in stage*; do
|
|
||||||
if [ -d "$d" ] && [ ! -f "$d/SKIP" ]; then
|
|
||||||
STAGE_LIST+="$d "
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
STAGE_LIST="$(echo "$STAGE_LIST" | xargs)"
|
|
||||||
|
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Patches to run before building showpieceos
|
|
||||||
# Allows for non-destructive deletion of files
|
|
||||||
|
|
||||||
rm stage2/EXPORT_IMAGE
|
|
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
install -d -o 1000 -g 1000 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart"
|
|
||||||
install -m 644 files/kiosk.desktop "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart/"
|
|
||||||
chown -R 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.config
|
|
||||||
mkdir -p "${ROOTFS_DIR}/tmp"
|
|
@@ -1,6 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Chromium
|
|
||||||
Exec=chromium-browser --profile-directory="showpiece-browser" --kiosk https://showpiece.sanin.dev/
|
|
||||||
StartupNotify=false
|
|
||||||
Terminal=false
|
|
@@ -1,3 +1,3 @@
|
|||||||
apt-transport-https
|
apt-transport-https
|
||||||
gnupg2
|
gnupg2
|
||||||
software-properties-common
|
software-properties-common
|
@@ -4,4 +4,4 @@ curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gp
|
|||||||
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
|
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
|
||||||
$(lsb_release -cs) stable" | \
|
$(lsb_release -cs) stable" | \
|
||||||
tee /etc/apt/sources.list.d/docker.list
|
tee /etc/apt/sources.list.d/docker.list
|
||||||
apt update
|
apt update
|
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
echo "Setting default wallpaper"
|
|
||||||
for conf in "${ROOTFS_DIR}/etc/xdg/pcmanfm/LXDE-pi/desktop-items-"*.conf; do
|
|
||||||
sed -E 's|/usr/share/rpd-wallpaper/.+$|/usr/share/rpd-wallpaper/RPiSystem.png|' -i "$conf"
|
|
||||||
done
|
|
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
echo "Setting custom cmdline"
|
|
||||||
sed -i 's/$/ video=HDMI-A-2:1920x1080M@60/' "${ROOTFS_DIR}/boot/firmware/cmdline.txt"
|
|
@@ -1,4 +1,4 @@
|
|||||||
IMG_SUFFIX="-client"
|
IMG_SUFFIX=""
|
||||||
if [ "${USE_QEMU}" = "1" ]; then
|
if [ "${USE_QEMU}" = "1" ]; then
|
||||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
||||||
fi
|
fi
|
||||||
|
0
stage4/SKIP
Normal file
0
stage4/SKIP
Normal file
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece"
|
|
||||||
install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/config"
|
|
||||||
install -m 644 files/docker-compose.yml "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/"
|
|
||||||
install -m 644 files/config.json5 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/showpiece/config/"
|
|
||||||
install -d -o 1000 -g 1000 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart"
|
|
||||||
install -m 644 files/kiosk.desktop "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config/autostart/"
|
|
||||||
chown -R 1000:1000 "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.config
|
|
||||||
mkdir -p "${ROOTFS_DIR}/tmp"
|
|
||||||
echo "$FIRST_USER_NAME" > "${ROOTFS_DIR}/tmp/first_username"
|
|
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
USERNAME=$(cat /tmp/first_username)
|
|
||||||
COMPOSEFILE="/home/$USERNAME/.config/showpiece/docker-compose.yml"
|
|
||||||
|
|
||||||
echo "@reboot docker compose --file '$COMPOSEFILE' up -d && chromium --kiosk 'http://localhost:8080/?w=1080'" >> /tmp/user.crontab
|
|
||||||
echo "40 3 * * * docker compose --file '$COMPOSEFILE' pull && docker compose --file '$COMPOSEFILE' up -d" >> /tmp/user.crontab
|
|
||||||
|
|
||||||
crontab -u "$USERNAME" /tmp/user.crontab
|
|
||||||
|
|
||||||
rm /tmp/first_username
|
|
||||||
rm /tmp/user.crontab
|
|
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
// Port for the viewer
|
|
||||||
"port": 8080,
|
|
||||||
// Port for the control panel
|
|
||||||
// (use a different port to restrict access to this interface)
|
|
||||||
"controlport": 8080,
|
|
||||||
// (optional) provide weather data to modules that support it
|
|
||||||
"weather": {
|
|
||||||
// Provide an OpenWeatherMap API key
|
|
||||||
// https://openweathermap.org/price
|
|
||||||
// "key": "not0a0real0key00281f631aef6ad3a1",
|
|
||||||
// "city": "chicago"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,10 +0,0 @@
|
|||||||
services:
|
|
||||||
showpiece:
|
|
||||||
container_name: showpiece
|
|
||||||
image: corysanin/showpiece:latest
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 8080:8080
|
|
||||||
volumes:
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
- ./config:/usr/src/showpiece/config
|
|
@@ -1,6 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Chromium
|
|
||||||
Exec=chromium-browser --profile-directory="showpiece-browser" --kiosk http://localhost:8080/?w=1080
|
|
||||||
StartupNotify=false
|
|
||||||
Terminal=false
|
|
@@ -1,4 +0,0 @@
|
|||||||
IMG_SUFFIX="-standalone"
|
|
||||||
if [ "${USE_QEMU}" = "1" ]; then
|
|
||||||
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
|
|
||||||
fi
|
|
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
|
||||||
copy_previous
|
|
||||||
fi
|
|
Reference in New Issue
Block a user