-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (35 loc) · 1.45 KB
/
piloader-sd.yaml
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
name: Build PiLoader SD Card Image
on:
push:
tags:
- '*'
jobs:
build:
name: Build PiLoader SD Card Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout AFL-automation
- name: Get SDM
run: curl -L https://raw.githubusercontent.com/gitbls/sdm/master/EZsdmInstaller | bash
- name: Get RasPi base image
run: curl -o raspios.img.xz https://downloads.raspberrypi.org//raspios_arm64/images/raspios_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64.img.xz
- name: Unzip image
run: xz -d raspios.img.xz
- name: Use SDM to provision image
run: sudo sdm --customize --plugin user:"setpassword=pi|password=${{secrets.PI_PASSWORD}}" --plugin L10n:host --plugin disables:piwiz --plugin raspiconfig:"spi=1|serial=1|i2c=1|rgpio=1|hostname=piloader" --regen-ssh-host-keys --restart raspios.img
# - name: Use SDM to "burn" image to file with hostname
# run: sudo sdm --burn piloader.img --hostname piloader raspios.img
# - name: Recompress image
# run: gzip piloader.img
- name: Recompress image
run: gzip raspios.img;mv raspios.img.gz piloader.img.gz
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/piloader.img.gz
asset_name: piloader
tag: ${{ github.ref }}
overwrite: true
body: "PiLoader full SD card image"