From 7e6f1edf28ed49ba513b8ca1e4484d7f15f47520 Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Fri, 28 Feb 2025 18:38:55 +0100
Subject: [PATCH 01/10] Add github action to trigger builds
---
.github/workflows/build.yaml | 139 +++++++++++++++++++++++++++++++++
.github/workflows/nightly.yaml | 60 ++++++++++++++
.github/workflows/release.yaml | 34 ++++++++
Makefile | 28 +++----
compose.yaml | 6 +-
scripts/00-bootstrap.sh | 5 +-
scripts/10-export.sh | 2 +-
7 files changed, 248 insertions(+), 26 deletions(-)
create mode 100644 .github/workflows/build.yaml
create mode 100644 .github/workflows/nightly.yaml
create mode 100644 .github/workflows/release.yaml
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..4b67adc
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,139 @@
+name: Build Image
+
+on:
+ workflow_call:
+ inputs:
+ build_arch:
+ type: string
+ required: true
+ default: armhf
+ os_version:
+ type: string
+ default: "nightly"
+ debian_version:
+ type: number
+ required: true
+ default: 12
+ debian_release:
+ type: string
+ required: true
+ default: bookworm
+ workflow_dispatch:
+ inputs:
+ build_arch:
+ type: choice
+ required: true
+ default: armhf
+ options:
+ - armhf
+ - arm64
+ os_version:
+ type: string
+ default: "nightly"
+ debian_version:
+ type: choice
+ required: true
+ default: 12
+ options:
+ - 11
+ - 12
+ debian_release:
+ type: choice
+ required: true
+ default: bookworm
+ options:
+ - bullseye
+ - bookworm
+
+jobs:
+ rootfs:
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/0rax/berryos-builder
+ options: --privileged
+ credentials:
+ username: ${{ github.actor }}
+ password: ${{ secrets.github_token }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Bootstrap rootfs
+ env:
+ BUILD_DIR: ${{ github.workspace }}
+ OUTPUT_DIR: ${{ github.workspace }}/out
+ OS_VERSION: ${{ inputs.os_version }}
+ GIT_HASH: ${{ github.sha }}
+ DEBIAN_VERSION: ${{ inputs.debian_version }}
+ DEBIAN_RELEASE: ${{ inputs.debian_release }}
+ BUILD_ARCH: ${{ inputs.build_arch }}
+ run: |
+ ./scripts/00-bootstrap.sh
+ - name: Upload rootfs
+ uses: actions/upload-artifact@v4
+ with:
+ name: berryos-${{ inputs.build_arch }}-rootfs
+ path: |
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*-rootfs.tar.xz
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*-packages.txt
+
+ image:
+ needs: rootfs
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/0rax/berryos-builder
+ options: --privileged
+ credentials:
+ username: ${{ github.actor }}
+ password: ${{ secrets.github_token }}
+ volumes:
+ - berryos-output:/tmp/berryos-output
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Download rootfs
+ uses: actions/download-artifact@v4
+ with:
+ name: berryos-${{ inputs.build_arch }}-rootfs
+ path: out/
+ - name: Export image
+ env:
+ BUILD_DIR: ${{ github.workspace }}
+ OUTPUT_DIR: ${{ github.workspace }}/out
+ OS_VERSION: ${{ inputs.os_version }}
+ DEBIAN_RELEASE: ${{ inputs.debian_release }}
+ BUILD_ARCH: ${{ inputs.build_arch }}
+ run: |
+ ./scripts/10-export.sh
+ - name: Upload image
+ uses: actions/upload-artifact@v4
+ with:
+ name: berryos-${{ inputs.build_arch }}-image
+ path: out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*.img.xz
+
+ checksums:
+ needs: image
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Download artifacts
+ uses: actions/download-artifact@v4
+ with:
+ path: out/
+ pattern: berryos-${{ inputs.build_arch }}-*
+ merge-multiple: true
+ - name: Generate checksums
+ env:
+ OS_VERSION: ${{ inputs.os_version }}
+ run: |
+ sha256sum \
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}-rootfs.tar.xz \
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}-packages.txt \
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}.img.xz \
+ > out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}-checksums.txt
+ - name: Upload checksums
+ uses: actions/upload-artifact@v4
+ with:
+ name: berryos-${{ inputs.build_arch }}-checksums
+ path: |
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*-checksums.txt
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
new file mode 100644
index 0000000..be09b40
--- /dev/null
+++ b/.github/workflows/nightly.yaml
@@ -0,0 +1,60 @@
+name: Nightly Build
+
+on:
+ pull_request:
+ types:
+ - opened
+ - ready_for_review
+ - reopened
+ - synchronize
+ schedule:
+ - cron: '0 2 * * *'
+ workflow_dispatch:
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ build_arch: ["armhf", "arm64"]
+ uses: ./.github/workflows/build.yaml
+ with:
+ os_version: nightly
+ debian_version: 12
+ debian_release: bookworm
+ build_arch: ${{ matrix.build_arch }}
+ release:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Download artifacts
+ uses: actions/download-artifact@v4
+ with:
+ path: out/
+ pattern: berryos-*
+ merge-multiple: true
+ - name: Update nightly release
+ uses: ncipollo/release-action@v1
+ with:
+ tag: bookworm-nightly
+ name: BerryOS Bookworm Nightly
+ prerelease: true
+ body: |
+ ## Nightly Builds
+
+ This is an automated nightly release. It includes daily built version of the BerryOS images.
+
+ These builds are provided without any warranty. No manual testing and benchmarks have been performed.
+
+ If you prefer a stable release, please download the [latest stable release](https://github.com/0rax/BerryOS/releases/latest).
+
+ ## Why use a nightly build?
+
+ Nightly builds allow you to make sure you are using an image that includes the latest version of all install packages. Making the initial setup of BerryOS faster.
+
+ It shouldn't be much different than using a stable release, but it might be a bit more unstable, especially during major updates (when BerryOS needs to be synced with the latest changes from Raspberry Pi OS).
+
+ ## Issues
+
+ If you find any issues when using a nightly build, please report them to the [issue tracker](https://github.com/0rax/BerryOS/issues). Make sure to include the content of `/etc/rpi-issue` in your report so we can pin-point the specific build you are using.
+ removeArtifacts: true
+ artifacts: "out/*"
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 0000000..5f5f9a5
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,34 @@
+name: Release
+
+on:
+ workflow_dispatch:
+ inputs:
+ os_version:
+ type: string
+ default: "nightly"
+ debian_version:
+ type: choice
+ required: true
+ default: 12
+ options:
+ - 11
+ - 12
+ debian_release:
+ type: choice
+ required: true
+ default: bookworm
+ options:
+ - bullseye
+ - bookworm
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ build_arch: ["armhf", "arm64"]
+ uses: ./.github/workflows/build.yaml
+ with:
+ os_version: nightly
+ debian_version: 12
+ debian_release: bookworm
+ build_arch: ${{ matrix.build_arch }}
diff --git a/Makefile b/Makefile
index 7c63dbf..87895a1 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ builder:
armhf: builder
$(info [BerryOS] Build for armhf)
- docker compose run builder make rootfs image \
+ docker compose run builder make rootfs image checksums \
OS_NAME="$(OS_NAME)" \
OS_VERSION="$(OS_VERSION)" \
OS_REPO="$(OS_REPO)" \
@@ -28,7 +28,7 @@ armhf: builder
arm64: builder
$(info [BerryOS] Build for arm64)
- docker compose run builder make rootfs image \
+ docker compose run builder make rootfs image checksums \
OS_NAME="$(OS_NAME)" \
OS_VERSION="$(OS_VERSION)" \
OS_REPO="$(OS_REPO)" \
@@ -62,24 +62,14 @@ image:
BUILD_ARCH="$(BUILD_ARCH)" \
./scripts/10-export.sh
-.PHONY: rootfs image
-
-## Release rules
-
-release: armhf arm64 checksums
-
+checksums: BUILD_ARCH ?= armhf
checksums:
- $(info [BerryOS] Generate checksums)
+ $(info [BerryOS/$(BUILD_ARCH)] Generate checksums)
cd out/ \
&& sha256sum \
- berryos-arm64-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-rootfs.tar.xz \
- berryos-arm64-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-packages.txt \
- berryos-arm64-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION)).img.xz \
- > berryos-arm64-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-checksums.txt \
- && sha256sum \
- berryos-armhf-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-rootfs.tar.xz \
- berryos-armhf-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-packages.txt \
- berryos-armhf-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION)).img.xz \
- > berryos-armhf-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-checksums.txt
+ berryos-$(BUILD_ARCH)-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-rootfs.tar.xz \
+ berryos-$(BUILD_ARCH)-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-packages.txt \
+ berryos-$(BUILD_ARCH)-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION)).img.xz \
+ > berryos-$(BUILD_ARCH)-$(DEBIAN_RELEASE)-$(subst .,,$(OS_VERSION))-checksums.txt \
-.PHONY: release checksums
+.PHONY: rootfs image checksums
diff --git a/compose.yaml b/compose.yaml
index f17de6f..bb12271 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -1,8 +1,6 @@
-version: '3.8'
-
services:
builder:
- image: berryos-bootstraper
+ image: ghcr.io/0rax/berryos-builder
build:
context: .
dockerfile: Dockerfile
@@ -11,7 +9,7 @@ services:
working_dir: /opt/bootstrap
privileged: true
docs:
- image: berryos-jekyll
+ image: ghcr.io/0rax/berryos-jekyll
build:
context: .
dockerfile: Dockerfile.docs
diff --git a/scripts/00-bootstrap.sh b/scripts/00-bootstrap.sh
index 0c1744c..bd30a8b 100755
--- a/scripts/00-bootstrap.sh
+++ b/scripts/00-bootstrap.sh
@@ -19,9 +19,10 @@ DEBIAN_VERSION="${DEBIAN_VERSION:-"12"}"
DEBIAN_RELEASE="${DEBIAN_RELEASE:-"bookworm"}"
## Build path
+SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
BUILD_DIR="${BUILD_DIR:-/opt/bootstrap}"
FILES_DIR="${BUILD_DIR}/rootfs"
-OUTPUT_DIR="${BUILD_DIR}/out"
+OUTPUT_DIR="${OUTPUT_DIR:-${BUILD_DIR}/out}"
ROOTFS_TAR="${OUTPUT_DIR}/${OS_NAME,,}-${BUILD_ARCH}-${DEBIAN_RELEASE}-${OS_VERSION//.}-rootfs.tar.xz"
ROOTFS_PKGS="${OUTPUT_DIR}/${OS_NAME,,}-${BUILD_ARCH}-${DEBIAN_RELEASE}-${OS_VERSION//.}-packages.txt"
@@ -124,7 +125,7 @@ configure_rootfs () {
DEBIAN_VARIANT="${DEBIAN_VARIANT}" \
DEBIAN_RELEASE="${DEBIAN_RELEASE}" \
DEBOOTSTRAP_URL="${DEBOOTSTRAP_URL}" \
- /bin/bash < "${BUILD_DIR}/scripts/01-chroot.sh"
+ /bin/bash < "${SCRIPT_DIR}/01-chroot.sh"
chroot "${ROOTFS_DIR}" dpkg --get-selections | awk '{ print $1 }' > "${ROOTFS_PKGS}"
# Copy static system configuration files
diff --git a/scripts/10-export.sh b/scripts/10-export.sh
index a445d01..26205f4 100755
--- a/scripts/10-export.sh
+++ b/scripts/10-export.sh
@@ -14,7 +14,7 @@ DEBIAN_RELEASE="${DEBIAN_RELEASE:-"bookworm"}"
## Build path
BUILD_DIR="${BUILD_DIR:-/opt/bootstrap}"
-OUTPUT_DIR="${BUILD_DIR}/out"
+OUTPUT_DIR="${OUTPUT_DIR:-${BUILD_DIR}/out}"
ROOTFS_TAR="${OUTPUT_DIR}/${OS_NAME,,}-${BUILD_ARCH}-${DEBIAN_RELEASE}-${OS_VERSION//.}-rootfs.tar.xz"
IMAGE_PATH="${OUTPUT_DIR}/${OS_NAME,,}-${BUILD_ARCH}-${DEBIAN_RELEASE}-${OS_VERSION//.}.img"
From efe26091056590d812ba55e882f52e2a2299ee0b Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Sat, 1 Mar 2025 03:56:30 +0100
Subject: [PATCH 02/10] Update nightly release note
---
.github/workflows/nightly.yaml | 18 +++++++++++-------
docs/_config.yml | 2 +-
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index be09b40..457de6c 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/nightly.yaml
@@ -30,7 +30,9 @@ jobs:
uses: actions/download-artifact@v4
with:
path: out/
- pattern: berryos-*
+ pattern: |
+ berryos-*.img.xz
+ berryos-*-checksums.txt
merge-multiple: true
- name: Update nightly release
uses: ncipollo/release-action@v1
@@ -43,17 +45,19 @@ jobs:
This is an automated nightly release. It includes daily built version of the BerryOS images.
- These builds are provided without any warranty. No manual testing and benchmarks have been performed.
-
- If you prefer a stable release, please download the [latest stable release](https://github.com/0rax/BerryOS/releases/latest).
-
- ## Why use a nightly build?
+ ### Why use a nightly build?
Nightly builds allow you to make sure you are using an image that includes the latest version of all install packages. Making the initial setup of BerryOS faster.
It shouldn't be much different than using a stable release, but it might be a bit more unstable, especially during major updates (when BerryOS needs to be synced with the latest changes from Raspberry Pi OS).
- ## Issues
+ ### Disclaimer
+
+ These builds are provided without any warranty. No manual testing and benchmarks have been performed.
+
+ If you prefer a stable release, please download the [latest stable release](https://github.com/0rax/BerryOS/releases/latest).
+
+ ### Issues
If you find any issues when using a nightly build, please report them to the [issue tracker](https://github.com/0rax/BerryOS/issues). Make sure to include the content of `/etc/rpi-issue` in your report so we can pin-point the specific build you are using.
removeArtifacts: true
diff --git a/docs/_config.yml b/docs/_config.yml
index 59f0975..bf0c04c 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -15,7 +15,7 @@ aux_links_new_tab: true
heading_anchors: true
back_to_top: true
back_to_top_text: "Back to top"
-footer_content: "Copyright © 2022 Jean-Philippe Roemer. Distributed under an ISC license."
+footer_content: "Copyright © 2025 JP \"0rax\" Roemer. Distributed under an ISC license."
gh_edit_link: true
gh_edit_link_text: "Edit this page on GitHub."
gh_edit_repository: "https://github.com/0rax/BerryOS"
From 66f33ca5b35a85acd3d7a58d3b2470568e08acb4 Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Sun, 2 Mar 2025 03:27:19 +0100
Subject: [PATCH 03/10] Add concurrency rule + allow release updates
---
.github/workflows/nightly.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index 457de6c..95c90ba 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/nightly.yaml
@@ -11,6 +11,10 @@ on:
- cron: '0 2 * * *'
workflow_dispatch:
+concurrency:
+ group: "nightly"
+ cancel-in-progress: true
+
jobs:
build:
strategy:
@@ -60,5 +64,6 @@ jobs:
### Issues
If you find any issues when using a nightly build, please report them to the [issue tracker](https://github.com/0rax/BerryOS/issues). Make sure to include the content of `/etc/rpi-issue` in your report so we can pin-point the specific build you are using.
- removeArtifacts: true
artifacts: "out/*"
+ allowUpdates: true
+ removeArtifacts: true
From e677997de17cdae0f711cd72672efd8fd8b9ef6f Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Sun, 2 Mar 2025 04:18:57 +0100
Subject: [PATCH 04/10] Generate checksum in a more convetional way
---
.../workflows/{build.yaml => builder.yaml} | 68 +++++++------------
.github/workflows/nightly.yaml | 7 +-
.github/workflows/release.yaml | 2 +-
3 files changed, 29 insertions(+), 48 deletions(-)
rename .github/workflows/{build.yaml => builder.yaml} (59%)
diff --git a/.github/workflows/build.yaml b/.github/workflows/builder.yaml
similarity index 59%
rename from .github/workflows/build.yaml
rename to .github/workflows/builder.yaml
index 4b67adc..5327be6 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/builder.yaml
@@ -1,4 +1,4 @@
-name: Build Image
+name: BerryOS Builder
on:
workflow_call:
@@ -45,6 +45,10 @@ on:
- bullseye
- bookworm
+defaults:
+ run:
+ shell: bash
+
jobs:
rootfs:
runs-on: ubuntu-latest
@@ -54,18 +58,18 @@ jobs:
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
+ env:
+ BUILD_DIR: ${{ github.workspace }}
+ OUTPUT_DIR: ${{ github.workspace }}/out
+ OS_VERSION: ${{ inputs.os_version }}
+ GIT_HASH: ${{ github.sha }}
+ DEBIAN_VERSION: ${{ inputs.debian_version }}
+ DEBIAN_RELEASE: ${{ inputs.debian_release }}
+ BUILD_ARCH: ${{ inputs.build_arch }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Bootstrap rootfs
- env:
- BUILD_DIR: ${{ github.workspace }}
- OUTPUT_DIR: ${{ github.workspace }}/out
- OS_VERSION: ${{ inputs.os_version }}
- GIT_HASH: ${{ github.sha }}
- DEBIAN_VERSION: ${{ inputs.debian_version }}
- DEBIAN_RELEASE: ${{ inputs.debian_release }}
- BUILD_ARCH: ${{ inputs.build_arch }}
run: |
./scripts/00-bootstrap.sh
- name: Upload rootfs
@@ -87,6 +91,12 @@ jobs:
password: ${{ secrets.github_token }}
volumes:
- berryos-output:/tmp/berryos-output
+ env:
+ BUILD_DIR: ${{ github.workspace }}
+ OUTPUT_DIR: ${{ github.workspace }}/out
+ OS_VERSION: ${{ inputs.os_version }}
+ DEBIAN_RELEASE: ${{ inputs.debian_release }}
+ BUILD_ARCH: ${{ inputs.build_arch }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -96,44 +106,16 @@ jobs:
name: berryos-${{ inputs.build_arch }}-rootfs
path: out/
- name: Export image
- env:
- BUILD_DIR: ${{ github.workspace }}
- OUTPUT_DIR: ${{ github.workspace }}/out
- OS_VERSION: ${{ inputs.os_version }}
- DEBIAN_RELEASE: ${{ inputs.debian_release }}
- BUILD_ARCH: ${{ inputs.build_arch }}
run: |
./scripts/10-export.sh
+ - name: Generate checksum
+ run: |
+ sha256sum "out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}.img.xz" \
+ > "out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}.img.xz.sha256"
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: berryos-${{ inputs.build_arch }}-image
- path: out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*.img.xz
-
- checksums:
- needs: image
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Download artifacts
- uses: actions/download-artifact@v4
- with:
- path: out/
- pattern: berryos-${{ inputs.build_arch }}-*
- merge-multiple: true
- - name: Generate checksums
- env:
- OS_VERSION: ${{ inputs.os_version }}
- run: |
- sha256sum \
- out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}-rootfs.tar.xz \
- out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}-packages.txt \
- out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}.img.xz \
- > out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-${OS_VERSION//.}-checksums.txt
- - name: Upload checksums
- uses: actions/upload-artifact@v4
- with:
- name: berryos-${{ inputs.build_arch }}-checksums
path: |
- out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*-checksums.txt
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*.img.xz
+ out/berryos-${{ inputs.build_arch }}-${{ inputs.debian_release }}-*.img.xz.sha256
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index 95c90ba..cf8776a 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/nightly.yaml
@@ -12,7 +12,7 @@ on:
workflow_dispatch:
concurrency:
- group: "nightly"
+ group: "bookworm-nightly"
cancel-in-progress: true
jobs:
@@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
build_arch: ["armhf", "arm64"]
- uses: ./.github/workflows/build.yaml
+ uses: ./.github/workflows/builder.yaml
with:
os_version: nightly
debian_version: 12
@@ -35,8 +35,7 @@ jobs:
with:
path: out/
pattern: |
- berryos-*.img.xz
- berryos-*-checksums.txt
+ berryos-*-image
merge-multiple: true
- name: Update nightly release
uses: ncipollo/release-action@v1
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 5f5f9a5..f30374a 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
build_arch: ["armhf", "arm64"]
- uses: ./.github/workflows/build.yaml
+ uses: ./.github/workflows/builder.yaml
with:
os_version: nightly
debian_version: 12
From 6b2e165d154a927cb3180c641a8d3d1bc3e33c9e Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Sun, 2 Mar 2025 16:48:38 +0100
Subject: [PATCH 05/10] update release note
---
.github/workflows/nightly.yaml | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index cf8776a..9f3ddf3 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/nightly.yaml
@@ -56,11 +56,25 @@ jobs:
### Disclaimer
- These builds are provided without any warranty. No manual testing and benchmarks have been performed.
+ These builds are provided without any warranty. No manual testing or benchmarks have been performed.
If you prefer a stable release, please download the [latest stable release](https://github.com/0rax/BerryOS/releases/latest).
- ### Issues
+ ## Compatibility
+
+ - `BerryOS/armhf`
+ - Image: [`berryos-armhf-bookworm-nightly.img.xz`](https://github.com/0rax/BerryOS/releases/download/bookworm-nightly/berryos-armhf-bookworm-nightly.img.xz)
+ - Compatibility: all Raspberry Pi models
+
+ - `BerryOS/arm64`
+ - Image [`berryos-arm64-bookworm-nightly.img.xz`](https://github.com/0rax/BerryOS/releases/download/bookworm-nightly/berryos-arm64-bookworm-nightly.img.xz)
+ - Compatibility:
+ - Raspberry Pi 3B, 3B+, 4 B & 400
+ - Compute Module 3, 3+ & 4
+ - Raspberry Pi Zero 2 W
+ - Raspberry Pi 5
+
+ ## Issues
If you find any issues when using a nightly build, please report them to the [issue tracker](https://github.com/0rax/BerryOS/issues). Make sure to include the content of `/etc/rpi-issue` in your report so we can pin-point the specific build you are using.
artifacts: "out/*"
From 48ed7ca9dc1f5c45ebbccd21745f12f95ef82cb7 Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Wed, 9 Apr 2025 03:07:15 +0200
Subject: [PATCH 06/10] Trigger Nightly Build
From 2c2993b8641aed16bab486240b3e6e2ee0ed4d0c Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Sun, 6 Jul 2025 18:32:59 +0200
Subject: [PATCH 07/10] Trigger nightly build
From aa674f936e81d3bf0e33deb022144c416a5a0eac Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Thu, 4 Sep 2025 13:44:53 +0200
Subject: [PATCH 08/10] Add build date to nightly `rpi-issue` & cleanup
workflows
---
.github/workflows/builder.yaml | 15 +++------------
.github/workflows/nightly.yaml | 1 -
.github/workflows/release.yaml | 14 ++++----------
Makefile | 4 ----
scripts/00-bootstrap.sh | 15 ++++++++++++++-
scripts/01-chroot.sh | 13 ++++++++-----
6 files changed, 29 insertions(+), 33 deletions(-)
diff --git a/.github/workflows/builder.yaml b/.github/workflows/builder.yaml
index 5327be6..1f73560 100644
--- a/.github/workflows/builder.yaml
+++ b/.github/workflows/builder.yaml
@@ -10,10 +10,6 @@ on:
os_version:
type: string
default: "nightly"
- debian_version:
- type: number
- required: true
- default: 12
debian_release:
type: string
required: true
@@ -22,6 +18,7 @@ on:
inputs:
build_arch:
type: choice
+ description: "Target architecture"
required: true
default: armhf
options:
@@ -29,16 +26,11 @@ on:
- arm64
os_version:
type: string
+ description: "OS Version"
default: "nightly"
- debian_version:
- type: choice
- required: true
- default: 12
- options:
- - 11
- - 12
debian_release:
type: choice
+ description: "Base Debian release"
required: true
default: bookworm
options:
@@ -63,7 +55,6 @@ jobs:
OUTPUT_DIR: ${{ github.workspace }}/out
OS_VERSION: ${{ inputs.os_version }}
GIT_HASH: ${{ github.sha }}
- DEBIAN_VERSION: ${{ inputs.debian_version }}
DEBIAN_RELEASE: ${{ inputs.debian_release }}
BUILD_ARCH: ${{ inputs.build_arch }}
steps:
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index 9f3ddf3..1b6129f 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/nightly.yaml
@@ -23,7 +23,6 @@ jobs:
uses: ./.github/workflows/builder.yaml
with:
os_version: nightly
- debian_version: 12
debian_release: bookworm
build_arch: ${{ matrix.build_arch }}
release:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index f30374a..aab87d7 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -5,17 +5,12 @@ on:
inputs:
os_version:
type: string
+ description: "OS Version"
default: "nightly"
- debian_version:
- type: choice
- required: true
- default: 12
- options:
- - 11
- - 12
debian_release:
type: choice
required: true
+ description: "Base Debian release"
default: bookworm
options:
- bullseye
@@ -28,7 +23,6 @@ jobs:
build_arch: ["armhf", "arm64"]
uses: ./.github/workflows/builder.yaml
with:
- os_version: nightly
- debian_version: 12
- debian_release: bookworm
+ os_version: ${{ inputs.os_version }}
+ debian_release: ${{ inputs.debian_release }}
build_arch: ${{ matrix.build_arch }}
diff --git a/Makefile b/Makefile
index 87895a1..65feea1 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,6 @@ OS_NAME ?= BerryOS
OS_VERSION ?= $(shell date --utc "+%Y.%m.%d")
OS_REPO ?= https://github.com/0rax/BerryOS
GIT_HASH ?= $(shell git rev-parse HEAD)
-DEBIAN_VERSION ?= 12
DEBIAN_RELEASE ?= bookworm
.DEFAULT: armhf
@@ -22,7 +21,6 @@ armhf: builder
OS_VERSION="$(OS_VERSION)" \
OS_REPO="$(OS_REPO)" \
GIT_HASH="$(GIT_HASH)" \
- DEBIAN_VERSION="$(DEBIAN_VERSION)" \
DEBIAN_RELEASE="$(DEBIAN_RELEASE)" \
BUILD_ARCH=armhf
@@ -33,7 +31,6 @@ arm64: builder
OS_VERSION="$(OS_VERSION)" \
OS_REPO="$(OS_REPO)" \
GIT_HASH="$(GIT_HASH)" \
- DEBIAN_VERSION="$(DEBIAN_VERSION)" \
DEBIAN_RELEASE="$(DEBIAN_RELEASE)" \
BUILD_ARCH=arm64
@@ -48,7 +45,6 @@ rootfs:
OS_VERSION="$(OS_VERSION)" \
OS_REPO="$(OS_REPO)" \
GIT_HASH="$(GIT_HASH)" \
- DEBIAN_VERSION="$(DEBIAN_VERSION)" \
DEBIAN_RELEASE="$(DEBIAN_RELEASE)" \
BUILD_ARCH="$(BUILD_ARCH)" \
./scripts/00-bootstrap.sh
diff --git a/scripts/00-bootstrap.sh b/scripts/00-bootstrap.sh
index bd30a8b..a37e90b 100755
--- a/scripts/00-bootstrap.sh
+++ b/scripts/00-bootstrap.sh
@@ -15,8 +15,21 @@ GIT_HASH="${GIT_HASH:-"main"}"
## Debian base
DEBIAN_VARIANT="Debian GNU/Linux"
-DEBIAN_VERSION="${DEBIAN_VERSION:-"12"}"
DEBIAN_RELEASE="${DEBIAN_RELEASE:-"bookworm"}"
+DEBIAN_VERSION=""
+case "${DEBIAN_RELEASE}" in
+ "bullseye")
+ DEBIAN_VERSION="11";;
+ "bookworm")
+ DEBIAN_VERSION="12";;
+ "trixie")
+ DEBIAN_VERSION="13";;
+ "forky")
+ DEBIAN_VERSION="14";;
+ "duke")
+ DEBIAN_VERSION="15";;
+esac
+
## Build path
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
diff --git a/scripts/01-chroot.sh b/scripts/01-chroot.sh
index 1be1a0f..0086266 100755
--- a/scripts/01-chroot.sh
+++ b/scripts/01-chroot.sh
@@ -10,6 +10,7 @@ fi
OS_NAME="${OS_NAME?}"
OS_VERSION="${OS_VERSION?}"
BUILD_ARCH="${BUILD_ARCH:-$(dpkg --print-architecture)}"
+GIT_HASH="${GIT_HASH?}"
## Debian base
DEBIAN_VARIANT="${DEBIAN_VARIANT?}"
@@ -108,10 +109,12 @@ rm -f /etc/sudoers.d/010_pi-nopasswd
## Setup OS specifics
# Setup rpi-issue
-tee /etc/rpi-issue << EOF
-${OS_NAME} ${OS_VERSION}
-Generated using berryos-builder, ${OS_REPO}, ${GIT_HASH}, ${BUILD_ARCH}
-EOF
+if [ "${OS_VERSION}" = "nightly" ]; then
+ echo "${OS_NAME}/${BUILD_ARCH} ${DEBIAN_RELEASE^} ${OS_VERSION^} ($(date --utc "+%Y-%m-%d"))" | tee /etc/rpi-issue
+else
+ echo "${OS_NAME}/${BUILD_ARCH} ${DEBIAN_RELEASE^} ${OS_VERSION^}" | tee /etc/rpi-issue
+fi
+echo "Generated using berryos-builder, ${OS_REPO}, ${GIT_HASH}, ${BUILD_ARCH}" | tee -a /etc/rpi-issue
install -m 644 /etc/rpi-issue /boot/firmware/issue.txt
if ! [ -L /boot/issue.txt ]; then
@@ -122,7 +125,7 @@ fi
DEBIAN_ISSUE=$(cat /etc/issue.net)
tee /etc/motd << EOF
-${OS_NAME}/${BUILD_ARCH} ${OS_VERSION} (${DEBIAN_ISSUE})
+${OS_NAME}/${BUILD_ARCH} ${DEBIAN_RELEASE^} ${OS_VERSION^} (${DEBIAN_ISSUE})
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
From 979bc9cc38c0fb0a03bc00619d2e408e1d53ea3e Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Thu, 4 Sep 2025 14:06:47 +0200
Subject: [PATCH 09/10] Update release workflow to generate a draft release
note
---
.github/workflows/nightly.yaml | 6 ------
.github/workflows/release.yaml | 23 +++++++++++++++++++++++
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml
index 1b6129f..c7dee29 100644
--- a/.github/workflows/nightly.yaml
+++ b/.github/workflows/nightly.yaml
@@ -1,12 +1,6 @@
name: Nightly Build
on:
- pull_request:
- types:
- - opened
- - ready_for_review
- - reopened
- - synchronize
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index aab87d7..888f9fb 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -26,3 +26,26 @@ jobs:
os_version: ${{ inputs.os_version }}
debian_release: ${{ inputs.debian_release }}
build_arch: ${{ matrix.build_arch }}
+ draft-release:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Download artifacts
+ uses: actions/download-artifact@v4
+ with:
+ path: out/
+ pattern: |
+ berryos-*-image
+ merge-multiple: true
+ - name: Generate release-note
+ uses: ncipollo/release-action@v1
+ with:
+ tag: ${{ input.debian_release }}-${{ input.os_version }}
+ name: BerryOS ${{ input.debian_release }} ${{ input.os_version }}
+ draft: true
+ generateReleaseNotes: true
+ artifacts: "out/*"
+ allowUpdates: false
+ skipIfReleaseExists: true
+ updateOnlyUnreleased: true
+ removeArtifacts: true
From 4b9eacbfa16ef0e8ebf30bf148f325cd2400e339 Mon Sep 17 00:00:00 2001
From: JP Roemer <2822534+0rax@users.noreply.github.com>
Date: Thu, 4 Sep 2025 14:18:29 +0200
Subject: [PATCH 10/10] Generate release name with proper casing
---
.github/workflows/release.yaml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 888f9fb..16f9faf 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -37,11 +37,18 @@ jobs:
pattern: |
berryos-*-image
merge-multiple: true
+ - name: Generate environment
+ env:
+ OS_VERSION: ${{ inputs.os_version }}
+ DEBIAN_RELEASE: ${{ inputs.debian_release }}
+ run: |
+ echo "RELEASE_NAME=BerryOS ${DEBIAN_RELEASE^} ${OS_VERSION^}" >> "${GITHUB_ENV}"
+ echo "ARTIFACT_SUFFIX=${DEBIAN_RELEASE,,}-${OS_VERSION//.}" >> "${GITHUB_ENV}"
- name: Generate release-note
uses: ncipollo/release-action@v1
with:
- tag: ${{ input.debian_release }}-${{ input.os_version }}
- name: BerryOS ${{ input.debian_release }} ${{ input.os_version }}
+ tag: ${{ inputs.debian_release }}-${{ inputs.os_version }}
+ name: ${{ env.RELEASE_NAME }}
draft: true
generateReleaseNotes: true
artifacts: "out/*"