-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.79 KB
/
rpi-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: RPi Image
on:
release:
types: [published]
workflow_dispatch:
jobs:
create-rpi-image:
strategy:
matrix:
arch:
- arch: x32
url: https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-11-19/2024-11-19-raspios-bookworm-armhf-lite.img.xz
- arch: x64
url: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-11-19/2024-11-19-raspios-bookworm-arm64-lite.img.xz
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create image
uses: dtcooper/rpi-image-modifier@v1
id: create-image
with:
base-image-url: ${{ matrix.arch.url }}
image-path: image_rpi_${{ matrix.arch.arch }}.img
compress-with-xz: true
cache: true
mount-repository: true
run: |
apt update
apt install -y libudev-dev libusb-1.0-0-dev libhidapi-libusb0 libjpeg-dev zlib1g-dev libopenjp2-7 libtiff5-dev libgtk-3-dev python3-pip python3-full
pip install streamdeckapi
crontab -l | { cat; echo "@reboot streamdeckapi-server"; } | crontab -
- name: Print outputs
shell: bash
run: |
echo 'image-path: ${{ steps.create-image.outputs.image-path }}'
echo 'image-size: ${{ steps.create-image.outputs.image-size }}'
echo 'image-sha256sum: ${{ steps.create-image.outputs.image-sha256sum }}'
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: built-image
path: ${{ steps.create-image.outputs.image-path }}
if-no-files-found: error
retention-days: 2
compression-level: 0 # Already compressed with xz above