forked from lysmarine/lysmarine_gen
-
Notifications
You must be signed in to change notification settings - Fork 76
82 lines (67 loc) · 2.03 KB
/
Copy pathbuild.yml
File metadata and controls
82 lines (67 loc) · 2.03 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: build_all
on:
push:
branches: ["**"]
tags: ["v*"]
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
build-lite-raspios-trixie-arm64:
name: build-lite-raspios-trixie-arm64
runs-on: ubuntu-24.04-arm
env:
DOCKER_IMAGE: arm64v8/debian:trixie
CONTAINER_DISTRO: debian:trixie
PKG_RELEASE: raspios
PKG_DISTRO: trixie
PKG_ARCH: arm64
BBN_KIND: LITE
EMU: off
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Move install-scripts
run: mv install-scripts cross-build-release/
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install wget xz-utils
- name: Make CI scripts executable
run: chmod a+x ci/*.sh
- name: Build
run: ci/build-ci.sh
timeout-minutes: 120
- name: XZ compress image (to dist/)
shell: bash
run: |
set -euo pipefail
DIR="cross-build-release/release/raspios"
OUTDIR="dist"
mkdir -p "$OUTDIR"
IMG="$(ls -1t "${DIR}"/*.img 2>/dev/null | head -n1 || true)"
if [ -z "${IMG}" ]; then
echo "ERROR: No .img found in ${DIR}"
ls -lah "${DIR}" || true
exit 1
fi
BASENAME="$(basename "$IMG")"
OUT="${OUTDIR}/${BASENAME}.xz"
echo "Compressing: ${IMG} -> ${OUT}"
# stream-compress so we don't need write perms in DIR
xz -T0 -9 -c -v "${IMG}" > "${OUT}"
ls -lh "${IMG}" "${OUT}"
- name: Upload artifact (.img.xz)
uses: actions/upload-artifact@v4
with:
name: bbn-os-lite-trixie-raspios-arm64-img
path: dist/*.img.xz
if-no-files-found: error
compression-level: 0
- name: Publish GitHub Release asset (tag v*)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
token: ${{ github.token }}
files: dist/*.img.xz