mirror of
https://github.com/unraid/api.git
synced 2026-01-11 19:20:09 -06:00
fix: variables passed properly
This commit is contained in:
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@@ -164,6 +164,7 @@ jobs:
|
|||||||
name: unraid-web
|
name: unraid-web
|
||||||
path: ./plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
|
path: ./plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
|
||||||
- name: Download Node.js From Slackbuilds
|
- name: Download Node.js From Slackbuilds
|
||||||
|
id: download-nodejs
|
||||||
run: |
|
run: |
|
||||||
# Get latest node version (based on main_node_version) from slackware
|
# Get latest node version (based on main_node_version) from slackware
|
||||||
main_node_version=$(sed 's/^v//' ../api/.nvmrc)
|
main_node_version=$(sed 's/^v//' ../api/.nvmrc)
|
||||||
@@ -179,7 +180,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
node_sha256=$(sha256sum "${{ github.workspace }}/plugin/archive/${latest_nodejs}" | cut -f 1 -d ' ')
|
node_sha256=$(sha256sum "${{ github.workspace }}/plugin/archive/${latest_nodejs}" | cut -f 1 -d ' ')
|
||||||
|
echo "NODEJS_FILENAME=${latest_nodejs}" >> $GITHUB_OUTPUT
|
||||||
|
echo "NODEJS_SHA256=${node_sha256}" >> $GITHUB_OUTPUT
|
||||||
- name: Download nghttp3
|
- name: Download nghttp3
|
||||||
|
id: download-nghttp3
|
||||||
run: |
|
run: |
|
||||||
# Get latest nghttp3 version
|
# Get latest nghttp3 version
|
||||||
base_nghttp3_url="https://mirrors.slackware.com/slackware/slackware64-current/slackware64/n/"
|
base_nghttp3_url="https://mirrors.slackware.com/slackware/slackware64-current/slackware64/n/"
|
||||||
@@ -190,16 +194,18 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
nghttp3_sha256=$(sha256sum "${{ github.workspace }}/plugin/archive/${latest_nghttp3}" | cut -f 1 -d ' ')
|
nghttp3_sha256=$(sha256sum "${{ github.workspace }}/plugin/archive/${latest_nghttp3}" | cut -f 1 -d ' ')
|
||||||
|
echo "NGHTTP3_FILENAME=${latest_nghttp3}" >> $GITHUB_OUTPUT
|
||||||
|
echo "NGHTTP3_SHA256=${nghttp3_sha256}" >> $GITHUB_OUTPUT
|
||||||
- name: Build Plugin
|
- name: Build Plugin
|
||||||
run: |
|
run: |
|
||||||
cd source/dynamix.unraid.net
|
cd source/dynamix.unraid.net
|
||||||
export API_VERSION=${{needs.build-test-api.outputs.API_VERSION}}
|
export API_VERSION=${{needs.build-test-api.outputs.API_VERSION}}
|
||||||
export API_MD5=${{needs.build-test-api.outputs.API_MD5}}
|
export API_MD5=${{needs.build-test-api.outputs.API_MD5}}
|
||||||
export API_SHA256=${{needs.build-test-api.outputs.API_SHA256}}
|
export API_SHA256=${{needs.build-test-api.outputs.API_SHA256}}
|
||||||
export NODEJS_FILENAME=${latest_nodejs}
|
export NODEJS_FILENAME=${{ steps.download-nodejs.outputs.NODEJS_FILENAME }}
|
||||||
export NODEJS_SHA256=${node_sha256}
|
export NODEJS_SHA256=${{ steps.download-nodejs.outputs.NODEJS_SHA256 }}
|
||||||
export NGHTTP3_FILENAME=${latest_nghttp3}
|
export NGHTTP3_FILENAME=${{ steps.download-nghttp3.outputs.NGHTTP3_FILENAME }}
|
||||||
export NGHTTP3_SHA256=${nghttp3_sha256}
|
export NGHTTP3_SHA256=${{ steps.download-nghttp3.outputs.NGHTTP3_SHA256 }}
|
||||||
bash ./pkg_build.sh s ${{github.event.pull_request.number}}
|
bash ./pkg_build.sh s ${{github.event.pull_request.number}}
|
||||||
bash ./pkg_build.sh p
|
bash ./pkg_build.sh p
|
||||||
- name: Upload binary txz and plg to Github artifacts
|
- name: Upload binary txz and plg to Github artifacts
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?xml version='1.0' standalone='yes'?>
|
<?xml version='1.0' standalone='yes'?>
|
||||||
|
|
||||||
<!DOCTYPE PLUGIN [
|
<!DOCTYPE PLUGIN [
|
||||||
<!ENTITY name "">
|
<!ENTITY name "">
|
||||||
<!ENTITY launch "Connect">
|
<!ENTITY launch "Connect">
|
||||||
@@ -11,17 +10,18 @@
|
|||||||
<!ENTITY SHA256 "">
|
<!ENTITY SHA256 "">
|
||||||
<!ENTITY API_version "">
|
<!ENTITY API_version "">
|
||||||
<!ENTITY API_SHA256 "">
|
<!ENTITY API_SHA256 "">
|
||||||
<!ENTITY NODE "">
|
<!ENTITY NODEJS_FILENAME "">
|
||||||
<!ENTITY NODE_SHA256 "">
|
<!ENTITY NODEJS_SHA256 "">
|
||||||
<!ENTITY NODE_TXZ "">
|
<!ENTITY NODEJS_TXZ "">
|
||||||
<!ENTITY NGHTTP3 "">
|
<!ENTITY NGHTTP3_FILENAME "">
|
||||||
<!ENTITY NGHTTP3_TXZ "">
|
<!ENTITY NGHTTP3_TXZ "">
|
||||||
<!ENTITY NGHTTP3_SHA256 "">
|
<!ENTITY NGHTTP3_SHA256 "">
|
||||||
<!ENTITY MAIN_TXZ "">
|
<!ENTITY MAIN_TXZ "">
|
||||||
<!ENTITY API_TGZ "">
|
<!ENTITY API_TGZ "">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" launch="&launch;" min="6.9.0-rc1" icon="globe">
|
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;"
|
||||||
|
launch="&launch;" min="6.9.0-rc1" icon="globe">
|
||||||
|
|
||||||
<CHANGES>
|
<CHANGES>
|
||||||
##a long time ago in a galaxy far far away
|
##a long time ago in a galaxy far far away
|
||||||
@@ -91,7 +91,8 @@ sha256check() {
|
|||||||
FILE=$1
|
FILE=$1
|
||||||
EXPECTED=$2
|
EXPECTED=$2
|
||||||
if [[ -f "${FILE}" ]]; then
|
if [[ -f "${FILE}" ]]; then
|
||||||
echo -n "Validating ${FILE}... " ACTUAL=$(sha256sum "${FILE}" 2>/dev/null | grep -Po '^\S+')
|
echo -n "Validating ${FILE}... "
|
||||||
|
ACTUAL=$(sha256sum "${FILE}" 2>/dev/null | grep -Po '^\S+')
|
||||||
if [[ "$EXPECTED" != "$ACTUAL" ]]; then
|
if [[ "$EXPECTED" != "$ACTUAL" ]]; then
|
||||||
rm "${FILE}"
|
rm "${FILE}"
|
||||||
echo " old. Deleted file."
|
echo " old. Deleted file."
|
||||||
@@ -108,13 +109,15 @@ exit 0
|
|||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<!-- download node -->
|
<!-- download node -->
|
||||||
<FILE Name="/boot/config/plugins/dynamix.my.servers/&NODE;" Run="upgradepkg --install-new" max="7.0.0-beta.5">
|
<FILE Name="/boot/config/plugins/dynamix.my.servers/&NODEJS_FILENAME;" Run="upgradepkg --install-new"
|
||||||
<URL>&NODE_TXZ;</URL>
|
max="7.0.0-beta.5">
|
||||||
<SHA256>&NODE_SHA256;</SHA256>
|
<URL>&NODEJS_TXZ;</URL>
|
||||||
|
<SHA256>&NODEJS_SHA256;</SHA256>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<!-- download nghttp3 -->
|
<!-- download nghttp3 -->
|
||||||
<FILE name="/boot/config/plugins/dynamix.my.servers/&NGHTTP3;" Run="upgradepkg --install-new" max="7.0.0-beta.5">
|
<FILE name="/boot/config/plugins/dynamix.my.servers/&NGHTTP3_FILENAME;" Run="upgradepkg --install-new"
|
||||||
|
max="7.0.0-beta.5">
|
||||||
<URL>&NGHTTP3_TXZ;</URL>
|
<URL>&NGHTTP3_TXZ;</URL>
|
||||||
<SHA256>&NGHTTP3_SHA256;</SHA256>
|
<SHA256>&NGHTTP3_SHA256;</SHA256>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|||||||
Reference in New Issue
Block a user