2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -32,7 +32,7 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
update_version:
|
update_version:
|
||||||
description: "update min version"
|
description: "update min version"
|
||||||
default: "24.08.14"
|
default: "24.08.18"
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
76
.github/workflows/data.yml
vendored
76
.github/workflows/data.yml
vendored
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
name: Data
|
name: Data
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
push:
|
push:
|
||||||
@@ -20,6 +24,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
|
with:
|
||||||
|
ref: page
|
||||||
|
|
||||||
- name: Init Env
|
- name: Init Env
|
||||||
run: |
|
run: |
|
||||||
@@ -27,34 +33,64 @@ jobs:
|
|||||||
git config --global user.name "AuxXxilium"
|
git config --global user.name "AuxXxilium"
|
||||||
sudo timedatectl set-timezone "Europe/Berlin"
|
sudo timedatectl set-timezone "Europe/Berlin"
|
||||||
|
|
||||||
- name: Get models
|
sudo apt update
|
||||||
|
sudo apt install -y build-essential libtool pkgconf libzstd-dev liblzma-dev libssl-dev # kmodule dependencies
|
||||||
|
|
||||||
|
- name: Get Release Data for Arc
|
||||||
run: |
|
run: |
|
||||||
. scripts/func.sh
|
REPO="${{ github.server_url }}/${{ github.repository }}"
|
||||||
models="{"
|
PRERELEASE="true"
|
||||||
WORK_PATH="files/p3"
|
|
||||||
mkdir -p "${WORK_PATH}/configs"
|
TAG=""
|
||||||
getConfigs "${WORK_PATH}/configs"
|
if [ "${PRERELEASE}" = "true" ]; then
|
||||||
for M in $(find "${WORK_PATH}/configs" -maxdepth 1 -name \*.yml 2>/dev/null | sed 's/.*\///; s/\.yml//'); do
|
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||||
models+="\"${M}\":["
|
else
|
||||||
for V in $(yq eval '.productvers | explode(.) | to_entries | map([.key])[] | .[]' "${WORK_PATH}/configs/${M}.yml" 2>/dev/null | sort -r); do
|
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
||||||
models+="\"${V}\","
|
TAG="${LATESTURL##*/}"
|
||||||
done
|
fi
|
||||||
models="${models%,}],"
|
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
|
||||||
done
|
rm -f arc-${TAG}.img.zip
|
||||||
models="${models%,}}"
|
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${REPO}/releases/download/${TAG}/arc-${TAG}.img.zip" -o "arc-${TAG}.img.zip")
|
||||||
echo "${models}" >docs/models.json
|
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 ]; then
|
||||||
rm -rf "${WORK_PATH}/configs"
|
echo "Download failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
unzip arc-${TAG}.img.zip -d "arc"
|
||||||
|
|
||||||
|
export TERM=xterm
|
||||||
|
|
||||||
|
sudo ./localbuild.sh create arc/ws arc/arc.img
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "create failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Get data
|
||||||
|
run: |
|
||||||
|
pip install -r scripts/requirements.txt
|
||||||
|
python scripts/func.py getmodels -w "arc/ws" -j "docs/models.json" -x "docs/models.xlsx"
|
||||||
|
python scripts/func.py getaddons -w "arc/ws" -j "docs/addons.json" -x "docs/addons.xlsx"
|
||||||
|
python scripts/func.py getmodules -w "arc/ws" -j "docs/modules.json" -x "docs/modules.xlsx"
|
||||||
|
|
||||||
|
- name: Upload to Artifacts
|
||||||
|
if: success()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: docs
|
||||||
|
path: |
|
||||||
|
docs/*.json
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
- name: Check and Push
|
- name: Check and Push
|
||||||
if: success() && inputs.push == true
|
if: success() && (inputs.push == true || github.event.action == 'created')
|
||||||
run: |
|
run: |
|
||||||
echo "Git push ..."
|
echo "Git push ..."
|
||||||
|
# git checkout main
|
||||||
git pull
|
git pull
|
||||||
status=$(git status -s | grep -E 'docs/models.json' | awk '{printf " %s", $2}')
|
status=$(git status -s | grep -E "docs" | awk '{printf " %s", $2}')
|
||||||
if [ -n "${status}" ]; then
|
if [ -n "${status}" ]; then
|
||||||
git add ${status}
|
git add ${status}
|
||||||
git commit -m "data: update $(date +%Y-%m-%d" "%H:%M:%S)"
|
git commit -m "data: update $(date +%Y-%m-%d" "%H:%M:%S)"
|
||||||
git push -f
|
git push -f
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -698,9 +698,10 @@ function make() {
|
|||||||
if [ "${AUTOMATED}" == "false" ] && [ "${VALID}" == "false" ]; then
|
if [ "${AUTOMATED}" == "false" ] && [ "${VALID}" == "false" ]; then
|
||||||
MSG="Failed to get PAT Data.\n"
|
MSG="Failed to get PAT Data.\n"
|
||||||
MSG+="Please manually fill in the URL and Hash of PAT.\n"
|
MSG+="Please manually fill in the URL and Hash of PAT.\n"
|
||||||
MSG+="You will find these Data at: https://download.synology.com"
|
MSG+="You will find these Data at:\n"
|
||||||
|
MSG+="https://auxxxilium.tech/wiki/arc-loader-arc-loader/url-hash-liste"
|
||||||
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" --default-button "OK" \
|
dialog --backtitle "$(backtitle)" --colors --title "Arc Build" --default-button "OK" \
|
||||||
--form "${MSG}" 10 110 2 "URL" 1 1 "${PAT_URL}" 1 7 100 0 "HASH" 2 1 "${PAT_HASH}" 2 7 100 0 \
|
--form "${MSG}" 10 110 2 "URL" 1 1 "${PAT_URL}" 1 7 100 0 "HASH" 2 1 "${PAT_HASH}" 2 8 100 0 \
|
||||||
2>"${TMP_PATH}/resp"
|
2>"${TMP_PATH}/resp"
|
||||||
RET=$?
|
RET=$?
|
||||||
[ ${RET} -eq 0 ] # ok-button
|
[ ${RET} -eq 0 ] # ok-button
|
||||||
|
|||||||
Reference in New Issue
Block a user