build cube image #154
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build cube image | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
push: | |
branches: | |
- "main" | |
# - "<branch>" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install dependencies | |
run: | | |
sudo apt update | |
sudo apt install coreutils p7zip-full qemu-user-static | |
- name: checkout CustomPiOS | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
repository: 'guysoft/CustomPiOS' | |
path: CustomPiOS | |
- name: checkout repository code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
path: repository | |
submodules: true | |
- name: download raspios lite arm64 image | |
run: | | |
cd repository/src/image-raspios_lite_arm64 | |
wget -c --trust-server-names 'https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz' | |
- name: update CustomPiOS paths | |
run: | | |
cd repository/src/image-raspios_lite_arm64 | |
../../../CustomPiOS/src/update-custompios-paths | |
- name: build image | |
run: | | |
sudo modprobe loop | |
cd repository/src | |
sudo bash -x ./build_dist raspios_lite_arm64 | |
- name: copy output | |
id: copy | |
run: | | |
source repository/src/config | |
NOW=$(date +"%Y-%m-%d-%H%M") | |
IMAGE=$NOW-cube-$DIST_VERSION | |
cp repository/src/workspace-raspios_lite_arm64/*.img $IMAGE.img | |
gzip $IMAGE.img | |
sync; sync; sync | |
echo "::set-output name=image::$IMAGE" | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: ${{ steps.copy.outputs.image }} | |
path: ${{ steps.copy.outputs.image }}.img.gz |