feat: add pre_package_hook input
This commit is contained in:
parent
6c2097d919
commit
8a5076c570
1 changed files with 4 additions and 0 deletions
|
@ -18,6 +18,9 @@ inputs:
|
|||
architecture:
|
||||
description: Architecture for which this package is built. Only relevant for the resulting filename.
|
||||
default: all
|
||||
pre_package_hook:
|
||||
description: Shell script to run right before invoking "dpkg-deb --build".
|
||||
default: ""
|
||||
runs:
|
||||
using: docker
|
||||
image: docker://docker.io/library/debian:bookworm
|
||||
|
@ -50,6 +53,7 @@ runs:
|
|||
[[ -f ${{ inputs.package_root }}/DEBIAN/prerm ]] && chmod +x ${{ inputs.package_root }}/DEBIAN/prerm
|
||||
[[ -f ${{ inputs.package_root }}/DEBIAN/postrm ]] && chmod +x ${{ inputs.package_root }}/DEBIAN/postrm
|
||||
sed -re "s/__VERSION__/${VERSION}-1/g" -i ${{ inputs.package_root }}/DEBIAN/control
|
||||
${{ inputs.pre_package_hook }}
|
||||
cd "${{ inputs.package_root }}/.."
|
||||
dpkg-deb --build $(basename ${{ inputs.package_root }})
|
||||
mv "$(basename ${{ inputs.package_root }}).deb" "${GITHUB_WORKSPACE}/${{ inputs.package_output_path }}/${{ inputs.package_name }}_${VERSION}-1_${{ inputs.architecture }}.deb"
|
||||
|
|
Loading…
Reference in a new issue