mirror of
https://github.com/unraid/api.git
synced 2026-01-05 16:09:49 -06:00
feat: upload files directly to cloudflare
This commit is contained in:
40
.github/workflows/main.yml
vendored
40
.github/workflows/main.yml
vendored
@@ -163,13 +163,43 @@ jobs:
|
||||
with:
|
||||
name: unraid-web
|
||||
path: ./plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
|
||||
- name: Download Node.js From Slackbuilds
|
||||
run: |
|
||||
# Get latest node version (based on main_node_version) from slackware
|
||||
main_node_version=$(find "${MAINDIR}/../.." -type f -path "*/api/.nvmrc" -exec sed 's/^v//' {} \;)
|
||||
base_node_url="https://mirrors.slackware.com/slackware/slackware64-current/slackware64/l/"
|
||||
latest_nodejs=$(wget -q -O- "${base_node_url}" | grep -o "nodejs-${main_node_version}\.[0-9.]*-x86_64-[0-9]*\.txz" | sort -V | tail -n 1)
|
||||
if [[ -z "${latest_nodejs}" ]]; then
|
||||
echo "Error: Failed to fetch the latest nodejs version."
|
||||
exit 1
|
||||
fi
|
||||
node_download_url="${base_node_url}${latest_nodejs}"
|
||||
if ! wget -q "${node_download_url}" -O "${{ github.workspace }}/plugin/archive/${latest_nodejs}"; then
|
||||
echo "Error: Failed to download nodejs package."
|
||||
exit 1
|
||||
fi
|
||||
node_sha256=$(sha256sum "${{ github.workspace }}/plugin/archive/${latest_nodejs}" | cut -f 1 -d ' ')
|
||||
- name: Download nghttp3
|
||||
run: |
|
||||
# Get latest nghttp3 version
|
||||
base_nghttp3_url="https://mirrors.slackware.com/slackware/slackware64-current/slackware64/n/"
|
||||
latest_nghttp3=$(wget -q -O- "${base_nghttp3_url}" | grep -o "nghttp3-[0-9.]*-x86_64-[0-9]*\.txz" | sort -V | tail -n 1)
|
||||
nghttp3_download_url="${base_nghttp3_url}${latest_nghttp3}"
|
||||
if ! wget -q "${nghttp3_download_url}" -O "${{ github.workspace }}/plugin/archive/${latest_nghttp3}"; then
|
||||
echo "Error: Failed to download nghttp3 package."
|
||||
exit 1
|
||||
fi
|
||||
nghttp3_sha256=$(sha256sum "${{ github.workspace }}/plugin/archive/${latest_nghttp3}" | cut -f 1 -d ' ')
|
||||
- name: Build Plugin
|
||||
run: |
|
||||
cd source/dynamix.unraid.net
|
||||
export API_VERSION=${{needs.build-test-api.outputs.API_VERSION}}
|
||||
export API_MD5=${{needs.build-test-api.outputs.API_MD5}}
|
||||
export API_SHA256=${{needs.build-test-api.outputs.API_SHA256}}
|
||||
|
||||
export NODEJS_FILENAME=${latest_nodejs}
|
||||
export NODEJS_SHA256=${node_sha256}
|
||||
export NGHTTP3_FILENAME=${latest_nghttp3}
|
||||
export NGHTTP3_SHA256=${nghttp3_sha256}
|
||||
bash ./pkg_build.sh s ${{github.event.pull_request.number}}
|
||||
bash ./pkg_build.sh p
|
||||
- name: Upload binary txz and plg to Github artifacts
|
||||
@@ -222,7 +252,7 @@ jobs:
|
||||
|
||||
- name: Copy other release files to pr-release
|
||||
run: |
|
||||
cp archive/dynamix.unraid.net.staging-*.txz pr-release/
|
||||
cp archive/*.txz pr-release/
|
||||
cp plugins/dynamix.unraid.net.staging.plg pr-release/
|
||||
|
||||
- name: Upload to Cloudflare
|
||||
@@ -275,9 +305,9 @@ jobs:
|
||||
removeMarkdown: false
|
||||
filePath: "./api/CHANGELOG.md"
|
||||
|
||||
- name: Run LS in unraid-api folder
|
||||
- name: Copy Files for Staging Release
|
||||
run: |
|
||||
cp archive/dynamix.unraid.net.staging-*.txz staging-release/
|
||||
cp archive/*.txz staging-release/
|
||||
cp plugins/dynamix.unraid.net.staging.plg staging-release/
|
||||
ls -al staging-release
|
||||
|
||||
@@ -331,6 +361,6 @@ jobs:
|
||||
files: |
|
||||
unraid-api-*.tgz
|
||||
plugins/dynamix.unraid.net*
|
||||
archive/dynamix.unraid.net*
|
||||
archive/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user