name: "Build list" author: "Igor Pecovnik" description: "Build list of various build targets" inputs: type: description: "conf,csc,tvb" required: true runs: using: "composite" steps: - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 1 repository: armbian/community path: community clean: false - name: "Check released" id: check-released shell: bash run: | truncate targets-present.txt targets-boards.txt --size=0 || true cd community sudo apt-get -y --allow-unauthenticated install npm nodejs gh || true sudo npm install -g json gh release view $(gh release list -L 1 --exclude-drafts | head -1 | awk '{print $(NF-1)}') --json assets 2>/dev/null | python3 -mjson.tool | sed '1,2d;$d' | json -ga name url -d, | sort | ( while read -r line; do name=$(echo $line | cut -d"," -f1) url=$(echo $line | cut -d"," -f2) if [ "${name: -3}" == ".xz" ]; then out_name=$(echo $name | cut -d"_" -f3 | awk '{print tolower($0)}') out_release=$(echo $name | cut -d"_" -f4) out_branch=$(echo $name | cut -d"_" -f5) out_kernel=$(echo $name | cut -d"_" -f6-7 | cut -d"." -f1-3 | cut -d"_" -f1) out_desktop=$(echo $name | cut -d"_" -f7) out_desktop=${out_desktop:-cli} [[ $out_desktop == xfce ]] && out_desktop="desktop" echo -ne "$out_name $out_branch $out_release $out_desktop\n" >> ../targets-present.txt echo -ne "$out_name" >> ../targets-boards.txt fi done ) cd .. - name: "Build images" id: build-images shell: bash run: | truncate targets.txt boards.txt --size=0 ###boards=($(find build/config/boards/ -mindepth 1 -maxdepth 1 -type f -iregex '.*\.\(tvb\|csc\|wip\)$' 2> /dev/null | sort | cut -d"/" -f4 | cut -d"." -f1)) ### Lets make them all boards=($(find build/config/boards/ -mindepth 1 -maxdepth 1 -type f -iregex '.*\.\(tvb\|csc\|wip\|conf\)$' 2> /dev/null | sort | cut -d"/" -f4 | cut -d"." -f1)) releases=("lunar" "sid") #branches=("legacy" "current" "edge") branches=("legacy" "edge") desktops=("minimal" "cli" "desktop") cleaned=() for board in ${boards[@]} do for release in ${releases[@]} do for branch in ${branches[@]} do for desktop in ${desktops[@]} do if [[ $desktop == desktop ]]; then variant=" xfce config_base 3dsupport browsers chat desktop_tools editors email internet multimedia office programming remote_desktop" elif [[ $desktop == minimal ]]; then variant="" desktop="minimal" else variant="" fi if grep "$board $branch $release $desktop" targets-present.txt >/dev/null; then echo "Already present" else KERNEL=$(cat build/config/boards/$board.* | grep KERNEL_TARGET || true) DESKTOP=$(cat build/config/boards/$board.* | grep HAS_VIDEO_OUTPUT || true) [[ -z "$(echo $KERNEL | grep $branch)" ]] && continue [[ -n "$(echo $DESKTOP | grep no)" && $desktop == desktop ]] && continue [[ $branch == legacy && $board != orangepi5 && $board != rock-5b ]] && continue [[ $board == rpi4b && $release == sid ]] && continue [[ $board == uefi-riscv64 && $release == sid ]] && continue [[ $board == uefi-riscv64 && $desktop == desktop ]] && continue printf "%-25s %-8s %-6s %-8s %-8s %-30s\n" "$board" "$branch" "$release" "$desktop" "stable yes" "$variant" >> targets.txt echo "$board" >> boards.txt fi done done done done