Skip to content

build armbian

build armbian #26

Workflow file for this run

name: "build armbian"
on:
workflow_dispatch:
inputs:
armbian_kernel_branch:
type: choice
description: 'Kernel branch'
options:
- legacy
- current
- edge
default: 'current'
armbian_ui:
type: choice
description: 'User interface (not all works)'
options:
- minimal
- server
- xfce
- gnome
- cinnamon
- i3-wm
- kde-plasma
default: 'server'
armbian_version:
description: 'Version'
required: false
default: 'v24.11.0-trunk.303'
jobs:
build:
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v4
# with:
# repository: 'armbian/build'
# ref: 'main'
# - uses: armbian/[email protected]
# with:
# armbian_token: "${{ secrets.REPO_KEY }}"
# armbian_target: "build"
# armbian_release: "bookworm"
# armbian_kernel_branch: "${{inputs.armbian_kernel_branch}}"
# armbian_ui: "${{inputs.armbian_ui}}"
# armbian_board: "bananapim4zero"
# # armbian_version: "v24.11.0-trunk.303"
- name: "Checkout Armbian os"
uses: actions/checkout@v4
with:
repository: armbian/os
fetch-depth: 0
clean: false
path: os
- name: "Checkout Armbian build framework"
uses: actions/checkout@v4
with:
repository: armbian/build
fetch-depth: 0
clean: false
path: build
- shell: bash
run: |
# read version from upstream Armbian OS
cat os/stable.json | jq '.version' | sed "s/\"//g" | sed 's/^/ARMBIAN_VERSION=/' >> $GITHUB_ENV
[[ "${{ inputs.armbian_version }}" != '' ]] && echo "ARMBIAN_VERSION=${{ inputs.armbian_version }}" >> $GITHUB_ENV
# echo "ARMBIAN_VERSION=${{ inputs.armbian_version }}" >> $GITHUB_ENV
# copy os userpatches and custom
mkdir -pv build/userpatches
rsync -av os/userpatches/. build/userpatches/
- shell: bash
run: |
# userspace decode
if [[ "${{ inputs.armbian_ui }}" == minimal ]]; then
BUILD_DESKTOP="no"
BUILD_MINIMAL="yes"
elif [[ "${{ inputs.armbian_ui }}" == server ]]; then
BUILD_DESKTOP="no"
BUILD_MINIMAL="no"
else
BUILD_DESKTOP="yes"
BUILD_MINIMAL="no"
DESKTOP_ENVIRONMENT="${{ inputs.armbian_ui }}"
DESKTOP_APPGROUPS_SELECTED=""
DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base"
fi
# go to build folder and checkout
cd build
git checkout ${{ inputs.armbian_branch }}
# execute build command
./compile.sh "build" \
REVISION="${{ env.ARMBIAN_VERSION }}" \
BOARD="bananapim4zero" \
BRANCH="${{ inputs.armbian_kernel_branch }}" \
RELEASE="bookworm" \
KERNEL_CONFIGURE="no" \
BUILD_DESKTOP="${BUILD_DESKTOP}" \
BUILD_MINIMAL="${BUILD_MINIMAL}" \
DESKTOP_ENVIRONMENT="${DESKTOP_ENVIRONMENT}" \
DESKTOP_APPGROUPS_SELECTED="${DESKTOP_APPGROUPS_SELECTED}" \
DESKTOP_ENVIRONMENT_CONFIG_NAME="${DESKTOP_ENVIRONMENT_CONFIG_NAME}" \
ENABLE_EXTENSIONS="" \
COMPRESS_OUTPUTIMAGE="sha,img,xz" \
SHARE_LOG="yes" \
INSTALL_HEADERS="yes" \ ## to build nexmon and drivers later
EXPERT="yes"
- uses: ncipollo/release-action@v1
with:
tag: armbian-bpim4z-"${{ env.ARMBIAN_VERSION }}"
name: 'base armbian image'
artifacts: "build/output/images/*"
allowUpdates: true
removeArtifacts: false
replacesArtifacts: true
makeLatest: true
token: "${{ github.token }}"