Skip to content

Add qnap-repack workflow. Bump version for actions/checkout, actions/… #1

Add qnap-repack workflow. Bump version for actions/checkout, actions/…

Add qnap-repack workflow. Bump version for actions/checkout, actions/… #1

Workflow file for this run

name: qnap repack
on:
push:
branches:
- feature/qnap
workflow_call:
inputs:
external_call:
description: 'To distinguish workflow_call from regular push / workflow_dispatch'
type: boolean
required: false
default: true
workflow_dispatch:
jobs:
build-linux:
uses: ./.github/workflows/linux.yml
if: not ${{ inputs.external_call }}
repack:
runs-on: [self-hosted, linux]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v4
- name: Repack linux installer for QNAP and rename build artifacts
run: |
bash qnap/repack-nzbget.sh
VERSION=$(cat configure.ac | grep AC_INIT | cut -d , -f 2 | xargs)
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