build: load custom from it's own repo

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-08-02 18:28:15 +02:00
parent 4162d718ae
commit 7dddfe463c
4 changed files with 39 additions and 3 deletions

View File

@ -58,20 +58,28 @@ jobs:
. scripts/func.sh
getLKMs "files/p3/lkms"
echo "LKMTAG=${TAG}" >> $GITHUB_ENV
getAddons "files/p3/addons"
echo "ADDONSTAG=${TAG}" >> $GITHUB_ENV
getModules "files/p3/modules"
echo "MODULESTAG=${TAG}" >> $GITHUB_ENV
getConfigs "files/p3/configs"
echo "CONFIGSTAG=${TAG}" >> $GITHUB_ENV
getPatches "files/p3/patches"
echo "PATCHESTAG=${TAG}" >> $GITHUB_ENV
getCustom "files/p3/custom"
echo "CUSTOMTAG=${TAG}" >> $GITHUB_ENV
getTheme "files/p1/boot/grub"
echo "THEMETAG=${TAG}" >> $GITHUB_ENV
getOffline "files/p3/configs"
getBuildroot "latest" "br"
echo "BR_XVERSION=${TAG}" >> $GITHUB_ENV
echo "BR_VERSION=${TAG}" >> $GITHUB_ENV
echo "BUILD_TIME=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "OK"
# Build incremental
- name: Build Image X
- name: Build Image
run: |
. scripts/func.sh
@ -161,6 +169,7 @@ jobs:
Configs: ${{ env.CONFIGSTAG }}
Modules: ${{ env.MODULESTAG }}
Patches: ${{ env.PATCHESTAG }}
Custom: ${{ env.CUSTOMTAG }}
Theme: ${{ env.THEMETAG }}
LKM: ${{ env.LKMTAG }}
Buildroot: ${{ env.BR_XVERSION }}

View File

@ -102,6 +102,8 @@ jobs:
echo "CONFIGSTAG=${TAG}" >> $GITHUB_ENV
getPatches "files/p3/patches"
echo "PATCHESTAG=${TAG}" >> $GITHUB_ENV
getCustom "files/p3/custom"
echo "CUSTOMTAG=${TAG}" >> $GITHUB_ENV
getTheme "files/p1/boot/grub"
echo "THEMETAG=${TAG}" >> $GITHUB_ENV
getOffline "files/p3/configs"
@ -112,7 +114,7 @@ jobs:
echo "OK"
# Build incremental
- name: Build Image X
- name: Build Image
run: |
. scripts/func.sh
@ -195,6 +197,7 @@ jobs:
Configs: ${{ env.CONFIGSTAG }}
Modules: ${{ env.MODULESTAG }}
Patches: ${{ env.PATCHESTAG }}
Custom: ${{ env.CUSTOMTAG }}
Theme: ${{ env.THEMETAG }}
LKM: ${{ env.LKMTAG }}
Buildroot: ${{ env.BR_XVERSION }}

View File

@ -13,6 +13,7 @@ getAddons "files/p3/addons"
getModules "files/p3/modules"
getConfigs "files/p3/configs"
getPatches "files/p3/patches"
getCustom "files/p3/custom"
getTheme "files/p1/boot/grub"
getOffline "files/p3/configs"
getBuildroot "latest" "br"

View File

@ -176,6 +176,29 @@ function getPatches() {
echo "Getting Patches end - ${TAG}"
}
# Get latest Custom
# $1 path
function getCustom() {
echo "Getting Custom begin"
local DEST_PATH="${1:-custom}"
local CACHE_FILE="/tmp/custom.zip"
rm -f "${CACHE_FILE}"
if [ -n "${CUSTOMTAG}" ]; then
TAG="${CUSTOMTAG}"
else
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-custom/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
fi
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-custom/releases/download/${TAG}/custom.zip" -o "${CACHE_FILE}")
echo "TAG=${TAG}; Status=${STATUS}"
[ ${STATUS} -ne 200 ] && exit 1
# Unzip Custom
rm -rf "${DEST_PATH}"
mkdir -p "${DEST_PATH}"
unzip "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting Custom end - ${TAG}"
}
# Get latest Theme
# $1 path
function getTheme() {