Skip to content

qnap repack

qnap repack #44

Workflow file for this run

name: qnap repack
on:
workflow_call:
inputs:
external_call:
description: 'To distinguish workflow_call from regular push / workflow_dispatch'
type: boolean
required: false
default: false
workflow_dispatch:
jobs:
build-linux:
uses: ./.github/workflows/linux.yml
if: ${{ inputs.external_call == false }}
repack:
runs-on: ubuntu-24.04
needs: [build-linux]
if: always()
permissions:
actions: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
- name: Download QDK and prepare environment
run: |
sudo mkdir -p /qnap
sudo chown $USER:$USER /qnap
curl -L https://github.com/nzbgetcom/build-files/releases/download/v1.0/QDK.tar.gz -o $HOME/QDK.tar.gz
tar zxf $HOME/QDK.tar.gz -C $HOME
- name: Repack linux installer for QNAP
run: |
export PATH="$PATH:$HOME/QDK/bin"
bash qnap/repack-nzbget.sh
- name: Rename build artifacts
if: github.ref_name != 'main'
run: |
VERSION=$(grep "set(VERSION " CMakeLists.txt | cut -d '"' -f 2)
NEW_VERSION="$VERSION-testing-$(date '+%Y%m%d')"
cd /qnap/nzbget/build/
for FILE in *.qpkg; do
[ -f $FILE ] || continue
NEW_FILE=${FILE/$VERSION/$NEW_VERSION}
sudo mv $FILE $NEW_FILE
done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-qnap-packages
path: /qnap/nzbget/build/*.qpkg
retention-days: 5
- name: Delete unneeded linux artifacts
if: ${{ inputs.external_call == false }}
uses: geekyeggo/delete-artifact@v4
with:
name: |
nzbget-linux-installers