Merge pull request #4833 from AuxXxilium/dev

build: update
This commit is contained in:
AuxXxilium 2024-11-22 16:58:14 +01:00 committed by GitHub
commit 6d65b418d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 39 additions and 56 deletions

View File

@ -57,7 +57,7 @@ jobs:
# Get extractor, LKM, Addons, Modules, Theme and Configs # Get extractor, LKM, Addons, Modules, Theme and Configs
- name: Get Buildroot - name: Get Buildroot
run: | run: |
. scripts/func.sh . scripts/func.sh "${{ secrets.BUILD_TOKEN }}"
echo "Get Dependencies" echo "Get Dependencies"
getAddons "files/p3/addons" getAddons "files/p3/addons"

View File

@ -83,7 +83,7 @@ jobs:
# Get extractor, LKM, Addons, Modules, Theme and Configs # Get extractor, LKM, Addons, Modules, Theme and Configs
- name: Get Dependencies for all Image - name: Get Dependencies for all Image
run: | run: |
. scripts/func.sh . scripts/func.sh "${{ secrets.BUILD_TOKEN }}"
echo "Get Dependencies" echo "Get Dependencies"
getAddons "files/p3/addons" getAddons "files/p3/addons"
@ -94,7 +94,7 @@ jobs:
getOffline "files/p3/configs" getOffline "files/p3/configs"
getLKMs "files/p3/lkms" getLKMs "files/p3/lkms"
getTheme "files/p1/boot/grub" getTheme "files/p1/boot/grub"
getBuildrootx "brx" getBuildrootx "brx"
getBuildroots "brs" getBuildroots "brs"
# Export Dependencies Version to env # Export Dependencies Version to env

View File

@ -6,30 +6,7 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
# Get latest Arc [ -n "${1}" ] && export TOKEN="${1}"
# $1 path
function getArcSystem() {
echo "Getting ArcSystem begin"
local DEST_PATH="${1}"
local RELEASE="${2}"
local CACHE_FILE="/tmp/system.zip"
rm -f "${CACHE_FILE}"
if [ "${RELEASE}" = "dev" ]; then
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-system/releases" | jq -r ".[].tag_name" | grep "dev" | sort -rV | head -1)"
else
local TAG="$(curl -m 10 -skL "https://api.github.com/repos/AuxXxilium/arc-system/releases" | jq -r ".[].tag_name" | grep -v "dev" | sort -rV | head -1)"
fi
if curl -skL "https://github.com/AuxXxilium/arc-system/releases/download/${TAG}/system-${TAG}.zip" -o "${CACHE_FILE}"; then
# Unzip LKMs
mkdir -p "${DEST_PATH}"
unzip -o "${CACHE_FILE}" -d "${DEST_PATH}"
rm -f "${CACHE_FILE}"
echo "Getting ArcSystem end - ${TAG}"
else
echo "Failed to get ArcSystem"
exit 1
fi
}
# Get latest LKMs # Get latest LKMs
# $1 path # $1 path
@ -198,25 +175,28 @@ function getBuildrootx() {
echo "Getting Buildroot-X begin" echo "Getting Buildroot-X begin"
local DEST_PATH="${1}" local DEST_PATH="${1}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')" TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
export BRXTAG="${TAG}" export BRXTAG="${TAG}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}" [ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
echo "Getting Kernel" echo "Getting Kernel"
rm -f "${DEST_PATH}/bzImage-arc" rm -f "${DEST_PATH}/bzImage-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
echo "Kernel: ${TAG}"
else
echo "Failed to get Kernel"
exit 1
fi
echo "Getting Ramdisk"
rm -f "${DEST_PATH}/initrd-arc" rm -f "${DEST_PATH}/initrd-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then while true; do
echo "Ramdisk: ${TAG}" if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
else echo "Kernel: ${TAG}"
echo "Failed to get Ramdisk" else
exit 1 echo "Failed to get Kernel"
fi break && exit 1
fi
echo "Getting Ramdisk"
if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-x/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then
echo "Ramdisk: ${TAG}"
else
echo "Failed to get Ramdisk"
break && exit 1
fi
[ -f "${DEST_PATH}/bzImage-arc" ] && [ -f "${DEST_PATH}/initrd-arc" ] && break
done <<<$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-x/releases" | jq -r '.assets[] | "\(.id) \(.name)"')
} }
# Get latest Buildroot-X # Get latest Buildroot-X
@ -225,25 +205,28 @@ function getBuildroots() {
echo "Getting Buildroot-S begin" echo "Getting Buildroot-S begin"
local DEST_PATH="${1}" local DEST_PATH="${1}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')" TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
export BRSTAG="${TAG}" export BRXTAG="${TAG}"
[ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}" [ ! -d "${DEST_PATH}" ] && mkdir -p "${DEST_PATH}"
echo "Getting Kernel" echo "Getting Kernel"
rm -f "${DEST_PATH}/bzImage-arc" rm -f "${DEST_PATH}/bzImage-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
echo "Kernel: ${TAG}"
else
echo "Failed to get Kernel"
exit 1
fi
echo "Getting Ramdisk"
rm -f "${DEST_PATH}/initrd-arc" rm -f "${DEST_PATH}/initrd-arc"
if curl -skL "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then while true; do
echo "Ramdisk: ${TAG}" if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/bzImage" -o "${DEST_PATH}/bzImage-arc"; then
else echo "Kernel: ${TAG}"
echo "Failed to get Ramdisk" else
exit 1 echo "Failed to get Kernel"
fi break && exit 1
fi
echo "Getting Ramdisk"
if curl -skL -H "Authorization: token ${TOKEN}" -H "Accept: application/octet-stream" "https://github.com/AuxXxilium/arc-buildroot-s/releases/download/${TAG}/rootfs.cpio.xz" -o "${DEST_PATH}/initrd-arc"; then
echo "Ramdisk: ${TAG}"
else
echo "Failed to get Ramdisk"
break && exit 1
fi
[ -f "${DEST_PATH}/bzImage-arc" ] && [ -f "${DEST_PATH}/initrd-arc" ] && break
done <<<$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/AuxXxilium/arc-buildroot-s/releases" | jq -r '.assets[] | "\(.id) \(.name)"')
} }
# Get latest Offline # Get latest Offline