diff --git a/action.yml b/action.yml index 9b37bfb..879f705 100644 --- a/action.yml +++ b/action.yml @@ -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"