build: try something new

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-01-05 19:28:41 +01:00
parent 1d55067ab0
commit d464dc5336
2 changed files with 61 additions and 5 deletions

View File

@ -26,6 +26,26 @@ on:
description: "buildroot version" description: "buildroot version"
default: "2023.02.x" default: "2023.02.x"
type: string type: string
addons_version:
description: "addons version"
default: "24.x.x"
type: string
configs_version:
description: "configs version"
default: "24.x.x"
type: string
modules_version:
description: "modules version"
default: "24.x.x"
type: string
lkm_version:
description: "lkm version"
default: "24.x.x"
type: string
patches_version:
description: "patches version"
default: "24.x.x"
type: string
jobs: jobs:
build: build:
@ -97,11 +117,21 @@ jobs:
. scripts/func.sh . scripts/func.sh
getExtractor "files/p3/extractor" getExtractor "files/p3/extractor"
LKMTAG="${{ inputs.lkm_version }}"
getLKMs "files/p3/lkms" ${{ inputs.prerelease }} getLKMs "files/p3/lkms" ${{ inputs.prerelease }}
echo "LKMTAG=${TAG}" >> $GITHUB_ENV
ADDONSTAG="${{ inputs.addons_version }}"
getAddons "files/p3/addons" ${{ inputs.prerelease }} getAddons "files/p3/addons" ${{ inputs.prerelease }}
echo "ADDONSTAG=${TAG}" >> $GITHUB_ENV
MODULESTAG="${{ inputs.modules_version }}"
getModules "files/p3/modules" ${{ inputs.prerelease }} getModules "files/p3/modules" ${{ inputs.prerelease }}
echo "MODULESTAG=${TAG}" >> $GITHUB_ENV
CONFIGSTAG="${{ inputs.configs_version }}"
getConfigs "files/p3/configs" ${{ inputs.prerelease }} getConfigs "files/p3/configs" ${{ inputs.prerelease }}
echo "CONFIGSTAG=${TAG}" >> $GITHUB_ENV
PATCHESTAG="${{ inputs.patches_version }}"
getPatches "files/p3/patches" ${{ inputs.prerelease }} getPatches "files/p3/patches" ${{ inputs.prerelease }}
echo "PATCHESTAG=${TAG}" >> $GITHUB_ENV
echo "OK" echo "OK"
@ -191,6 +221,12 @@ jobs:
tag_name: ${{ env.VERSION }} tag_name: ${{ env.VERSION }}
prerelease: ${{ inputs.prerelease }} prerelease: ${{ inputs.prerelease }}
body: | body: |
Buildroot: ${{ inputs.br_version }}
Addons: ${{ env.ADDONSTAG }}
Configs: ${{ env.CONFIGSTAG }}
Modules: ${{ env.MODULESTAG }}
Patches: ${{ env.PATCHESTAG }}
LKM: ${{ env.LKMTAG }}
${{ steps.Changelog.outputs.changelog }} ${{ steps.Changelog.outputs.changelog }}
files: | files: |
arc-${{ env.VERSION }}.img.zip arc-${{ env.VERSION }}.img.zip

View File

@ -58,7 +58,11 @@ function getLKMs() {
local DEST_PATH="${1:-lkms}" local DEST_PATH="${1:-lkms}"
local CACHE_FILE="/tmp/rp-lkms.zip" local CACHE_FILE="/tmp/rp-lkms.zip"
rm -f "${CACHE_FILE}" rm -f "${CACHE_FILE}"
TAG="$(curl -s "https://api.github.com/repos/AuxXxilium/redpill-lkm/releases/latest" | grep -oP '"tag_name": "\K(.*)(?=")')" if [ -n "${LKMTAG}" ]; then
TAG="${LKMTAG}"
else
TAG="$(curl -s "https://api.github.com/repos/AuxXxilium/redpill-lkm/releases/latest" | grep -oP '"tag_name": "\K(.*)(?=")')"
fi
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o "${CACHE_FILE}") STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/redpill-lkm/releases/download/${TAG}/rp-lkms.zip" -o "${CACHE_FILE}")
echo "TAG=${TAG}; Status=${STATUS}" echo "TAG=${TAG}; Status=${STATUS}"
[ ${STATUS} -ne 200 ] && exit 1 [ ${STATUS} -ne 200 ] && exit 1
@ -77,7 +81,11 @@ function getAddons() {
local DEST_PATH="${1:-addons}" local DEST_PATH="${1:-addons}"
local CACHE_DIR="/tmp/addons" local CACHE_DIR="/tmp/addons"
local CACHE_FILE="/tmp/addons.zip" local CACHE_FILE="/tmp/addons.zip"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-addons/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')" if [ -n "${ADDONSTAG}" ]; then
TAG="${ADDONSTAG}"
else
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-addons/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
fi
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-addons/releases/download/${TAG}/addons.zip" -o "${CACHE_FILE}") STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-addons/releases/download/${TAG}/addons.zip" -o "${CACHE_FILE}")
echo "TAG=${TAG}; Status=${STATUS}" echo "TAG=${TAG}; Status=${STATUS}"
[ ${STATUS} -ne 200 ] && exit 1 [ ${STATUS} -ne 200 ] && exit 1
@ -105,7 +113,11 @@ function getModules() {
local DEST_PATH="${1:-modules}" local DEST_PATH="${1:-modules}"
local CACHE_FILE="/tmp/modules.zip" local CACHE_FILE="/tmp/modules.zip"
rm -f "${CACHE_FILE}" rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-modules/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')" if [ -n "${MODULESTAG}" ]; then
TAG="${MODULESTAG}"
else
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-modules/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
fi
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-modules/releases/download/${TAG}/modules.zip" -o "${CACHE_FILE}") STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-modules/releases/download/${TAG}/modules.zip" -o "${CACHE_FILE}")
echo "TAG=${TAG}; Status=${STATUS}" echo "TAG=${TAG}; Status=${STATUS}"
[ ${STATUS} -ne 200 ] && exit 1 [ ${STATUS} -ne 200 ] && exit 1
@ -124,7 +136,11 @@ function getConfigs() {
local DEST_PATH="${1:-configs}" local DEST_PATH="${1:-configs}"
local CACHE_FILE="/tmp/configs.zip" local CACHE_FILE="/tmp/configs.zip"
rm -f "${CACHE_FILE}" rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-configs/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')" if [ -n "${CONFIGSTAG}" ]; then
TAG="${CONFIGSTAG}"
else
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-configs/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
fi
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-configs/releases/download/${TAG}/configs.zip" -o "${CACHE_FILE}") STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-configs/releases/download/${TAG}/configs.zip" -o "${CACHE_FILE}")
echo "TAG=${TAG}; Status=${STATUS}" echo "TAG=${TAG}; Status=${STATUS}"
[ ${STATUS} -ne 200 ] && exit 1 [ ${STATUS} -ne 200 ] && exit 1
@ -143,7 +159,11 @@ function getPatches() {
local DEST_PATH="${1:-patches}" local DEST_PATH="${1:-patches}"
local CACHE_FILE="/tmp/patches.zip" local CACHE_FILE="/tmp/patches.zip"
rm -f "${CACHE_FILE}" rm -f "${CACHE_FILE}"
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-patches/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')" if [ -n "${PATCHESTAG}" ]; then
TAG="${PATCHESTAG}"
else
TAG="$(curl -s https://api.github.com/repos/AuxXxilium/arc-patches/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')"
fi
STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-patches/releases/download/${TAG}/patches.zip" -o "${CACHE_FILE}") STATUS=$(curl -w "%{http_code}" -L "https://github.com/AuxXxilium/arc-patches/releases/download/${TAG}/patches.zip" -o "${CACHE_FILE}")
echo "TAG=${TAG}; Status=${STATUS}" echo "TAG=${TAG}; Status=${STATUS}"
[ ${STATUS} -ne 200 ] && exit 1 [ ${STATUS} -ne 200 ] && exit 1