-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (92 loc) · 3.1 KB
/
build.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
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
83
84
85
86
87
88
89
90
91
92
93
name: Build
on:
push:
branches:
- main
jobs:
prepare_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get time
id: time
uses: nanzm/get-time-action@v1.1
with:
format: 'YYYYMMDD-HHmm'
- name: Create empty release
id: release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.time.outputs.time }}
body_path: README.md
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
outputs:
release_id: ${{ steps.release.outputs.id }}
build:
runs-on: ubuntu-latest
needs: prepare_release
strategy:
matrix:
CODENAME: [bookworm, jammy]
steps:
- name: Get more space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 2048
swap-size-mb: 100
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Install deb deps
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: devscripts build-essential debhelper po4a gettext debootstrap libnss-mymachines live-boot-doc live-config-doc live-manual-html systemd-container qemu-user-static debian-archive-keyring
version: 1.0
- name: Checkout
uses: actions/checkout@v3
- name: Build live-build
shell: bash
run: |
sudo apt update
mkdir live-build && cd live-build
git clone https://salsa.debian.org/live-team/live-build.git -b master --depth=1
cd live-build
sudo apt -y install debhelper po4a gettext
patch -p1 < ../../0001-binary_linux-image-install-dtbs.patch
patch -p1 < ../../grub-dtb.patch
dpkg-buildpackage -us -uc
sudo apt -y install ../live-build_*_all.deb
- name: Build live iso
shell: bash
run: |
mkdir iso-build && cd iso-build
cp ../lb-config-${{ matrix.CODENAME }}.sh lb-config.sh
cp ../additional-packages.${{ matrix.CODENAME }} additional-packages
cp ../additional-packages-live.jammy additional-packages-live.jammy
cp ../networkmanager.yaml .
cp ../customize-chroot-${{ matrix.CODENAME }}.hook.chroot customize-chroot.hook.chroot
cp ../10_linux .
chmod +x lb-config.sh
./lb-config.sh
sudo apt -y install qemu-user-static debian-archive-keyring
sudo lb build
- name: Upload iso
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.prepare_release.outputs.release_id }}
file: "iso-build/*.iso"
draft: false
overwrite: true
- name: Rollback release
if: failure()
uses: author/action-rollback@stable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.prepare_release.outputs.release_id }}