Skip to content

Commit

Permalink
build armbian
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurii Smetanka committed Oct 21, 2024
1 parent 8616002 commit c19c4a7
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 1 deletion.
129 changes: 129 additions & 0 deletions .github/workflows/build-armbian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
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 }}"
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Build ${{ matrix.name }} img file
run: cd publish/build; ls -la .; pwd; make packer; make ${{ matrix.id }}

- name: Change name of .img.xz to add version
run: |
sudo chown runner:docker "pwnagotchi-${{ matrix.id }}.img"
Expand Down

0 comments on commit c19c4a7

Please sign in to comment.