mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 23:49:52 +07:00
tree: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
eb74f7bfed
commit
06f4e05de4
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -32,7 +32,7 @@ on:
|
||||
type: boolean
|
||||
update_version:
|
||||
description: "update min version"
|
||||
default: "24.08.14"
|
||||
default: "24.08.18"
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
|
78
.github/workflows/data.yml
vendored
78
.github/workflows/data.yml
vendored
@ -7,6 +7,10 @@
|
||||
|
||||
name: Data
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
push:
|
||||
@ -20,6 +24,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
ref: page
|
||||
|
||||
- name: Init Env
|
||||
run: |
|
||||
@ -27,34 +33,64 @@ jobs:
|
||||
git config --global user.name "AuxXxilium"
|
||||
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: |
|
||||
. scripts/func.sh
|
||||
models="{"
|
||||
WORK_PATH="files/p3"
|
||||
mkdir -p "${WORK_PATH}/configs"
|
||||
getConfigs "${WORK_PATH}/configs"
|
||||
for M in $(find "${WORK_PATH}/configs" -maxdepth 1 -name \*.yml 2>/dev/null | sed 's/.*\///; s/\.yml//'); do
|
||||
models+="\"${M}\":["
|
||||
for V in $(yq eval '.productvers | explode(.) | to_entries | map([.key])[] | .[]' "${WORK_PATH}/configs/${M}.yml" 2>/dev/null | sort -r); do
|
||||
models+="\"${V}\","
|
||||
done
|
||||
models="${models%,}],"
|
||||
done
|
||||
models="${models%,}}"
|
||||
echo "${models}" >docs/models.json
|
||||
rm -rf "${WORK_PATH}/configs"
|
||||
REPO="${{ github.server_url }}/${{ github.repository }}"
|
||||
PRERELEASE="true"
|
||||
|
||||
TAG=""
|
||||
if [ "${PRERELEASE}" = "true" ]; then
|
||||
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||
else
|
||||
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
||||
TAG="${LATESTURL##*/}"
|
||||
fi
|
||||
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
|
||||
rm -f arc-${TAG}.img.zip
|
||||
STATUS=$(curl -kL --connect-timeout 10 -w "%{http_code}" "${REPO}/releases/download/${TAG}/arc-${TAG}.img.zip" -o "arc-${TAG}.img.zip")
|
||||
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 ]; then
|
||||
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
|
||||
if: success() && inputs.push == true
|
||||
if: success() && (inputs.push == true || github.event.action == 'created')
|
||||
run: |
|
||||
echo "Git push ..."
|
||||
# git checkout main
|
||||
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
|
||||
git add ${status}
|
||||
git commit -m "data: update $(date +%Y-%m-%d" "%H:%M:%S)"
|
||||
git push -f
|
||||
fi
|
||||
|
||||
|
||||
fi
|
@ -698,9 +698,10 @@ function make() {
|
||||
if [ "${AUTOMATED}" == "false" ] && [ "${VALID}" == "false" ]; then
|
||||
MSG="Failed to get PAT Data.\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" \
|
||||
--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"
|
||||
RET=$?
|
||||
[ ${RET} -eq 0 ] # ok-button
|
||||
|
Loading…
Reference in New Issue
Block a user