Skip to content

ULO Autobuilder

ULO Autobuilder #82

Workflow file for this run

#
# Copyright (C) 2024 nosignals
#
name: ULO Autobuilder
on:
workflow_dispatch:
inputs:
kernel:
description: 'Kernel Version (ex. 6.6.6, 6.1.31-localversion)'
required: true
default: '5.4.279'
type: string
devices:
description: "Devices"
required: true
default: "s905x4"
type: choice
options:
- s905x
- s905x2
- s905x3
- s905x4
- h5-orangepi-zeroplus2
- h5-orangepi-zeroplus
- h5-orangepi-prime
- h5-orangepi-pc2
- h6-orangepi-lite2
- h6-orangepi-1plus
- h6-orangepi-3
- h6-orangepi-3lts
- h616-orangepi-zero2
- h618-orangepi-zero2w
- h618-orangepi-zero3
- rk3566-orangepi-3b
- rk3588-orangepi-5plus
- rk3588s-orangepi-5
versi:
description: "Pilih ULO / ULO2"
required: true
default: "ulo"
rootfs_url:
description: "Upload ROOTFS via link (MEGA,mediafire,GDrive)"
required: false
default: ""
rootfs:
description: 'ROOTFS File (ex. ImmortalWrt-21-02-7-rootfs.tar.gz)'
required: true
default: 'ImmortalWrt-21-02-7-rootfs.tar.gz'
type: string
rootfs_size:
description: "ROOTFS Size, min 640 (756, 1024, 2048, etc)"
required: true
default: '1024'
type: string
fwinfo:
description: 'Firmware Information'
required: true
default: 'your custom information at release pages'
type: string
jobs:
build_ipk:
permissions:
contents: write
name: ULO Autobuilder
runs-on: ubuntu-20.04
steps:
- name: Cleanup and Installing Prerequisites
env:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi `docker images -q`
sudo -E apt-get update
sudo -E apt-get -y install lolcat build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils rsync unzip zlib1g-dev file wget
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
sudo pip3 install gdown
sudo pip3 install git+https://github.com/Juvenal-Yescas/mediafire-dl
wget https://mega.nz/linux/repo/xUbuntu_20.04/amd64/megacmd-xUbuntu_20.04_amd64.deb && sudo apt install "$PWD/megacmd-xUbuntu_20.04_amd64.deb"
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: s905x4
- name: Download ROOTFS via link
run: |
if [ $(echo ${{ inputs.rootfs_url }} | grep "drive.") ]; then
if [ $(echo ${{ inputs.rootfs_url }} | awk -F "/" '{print $6}') ]; then
link_gdrive=$(echo ${{ inputs.rootfs_url }} | awk -F "/" '{print $6}')
else
link_gdrive=$(echo ${{ inputs.rootfs_url }} | awk -F "/" '{print $4}' | awk -F "?id=" '{print $2}'|awk -F "&export" '{print $1}')
fi
sudo gdown ${link_gdrive} -O ./rootfs/rootfs.tar.gz
else
if [ $(echo ${{ inputs.rootfs_url }} | grep "mediafire.com") ]; then
cd rootfs && sudo mediafire-dl ${{ inputs.rootfs_url }} && cd ..
else
if [ $(echo ${{ inputs.rootfs_url }} | grep "mega.nz") ]; then
file_mega=$(sudo mega-get ${{ inputs.rootfs_url }} | awk -F: '{print $2}')
sudo mv ${file_mega} ./rootfs
else
sudo wget -q --no-check-certificate ${{ inputs.rootfs_url }} -P ./rootfs
fi
fi
fi
- name: Download add-on kernel for s905x4
run: |
sudo mkdir core/kernel/6.6.66
sudo wget -O core/kernel/6.6.66/6.6.66.zip https://drive3.edikurbot.workers.dev/0:/6.6.66.zip
cd core/kernel/6.6.66
sudo unzip 6.6.66.zip
sudo rm 6.6.66.zip
cd ../../..
- name: Building OpenWrt
run: |
sudo chmod +x ulo2
sudo chmod +x ulo
sudo ./${{ inputs.versi }} -k ${{ inputs.kernel }} -m ${{ inputs.devices }} -r ${{ inputs.rootfs }} -s ${{ inputs.rootfs_size }}
- name: Creating Package Artifact
run: |
mkdir -p ./artifact
cp -rf ./out/${{ inputs.devices }}/* ./artifact/
- name: Delivering Package
uses: actions/upload-artifact@v4
with:
name: openwrt_package
path: ./artifact/*
- name: Upload release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./artifact/*
tag: ${{ inputs.devices }}
file_glob: true
overwrite: true
body: |
## OpenWRT Release for ${{ inputs.devices }} devices
ULO-Builder Release from Github Workflow
### OpenWrt Image Information
- Firmware Details :
- Devices type : ${{ inputs.devices }}
- Kernel version : ${{ inputs.kernel }}
- ROOTFS File : ${{ inputs.rootfs }}
- ROOTFS Size : ${{ inputs.rootfs_size }}
- Firmware Information :
- ${{ inputs.fwinfo }}