Fixed download script #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the kernel module | |
on: [push, pull_request] | |
jobs: | |
build-kmod: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- run: sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install dkms linux-headers-`uname -r` build-essential devscripts dh-make | |
- run: source dkms.conf && echo "BUILT_MODULE_NAME=$BUILT_MODULE_NAME" >> $GITHUB_ENV && echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV | |
- run: echo "DKMS_DIR=/usr/src/${BUILT_MODULE_NAME}-${PACKAGE_VERSION}" >> $GITHUB_ENV | |
- run: sudo mkdir $DKMS_DIR | |
- run: sudo cp -r * $DKMS_DIR | |
- run: sudo dkms build -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION | |
- run: sudo dkms mktarball -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION --source-only | |
- run: sudo dkms mkdeb -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION --source-only | |
- name: Find debian package | |
id: dkms_path | |
run: | | |
export F="$(sudo find /var/lib/dkms/${BUILT_MODULE_NAME}/${PACKAGE_VERSION}/deb/${BUILT_MODULE_NAME}-dkms_${PACKAGE_VERSION}*.deb)" | |
echo $F | |
echo "::set-output name=path::$F" | |
echo "::set-output name=name::$(basename $F)" | |
- name: Find tarball | |
id: tarball_path | |
run: | | |
export F="$(sudo find /var/lib/dkms/${BUILT_MODULE_NAME}/${PACKAGE_VERSION}/tarball/${BUILT_MODULE_NAME}-${PACKAGE_VERSION}*.tar.gz)" | |
echo $F | |
echo "::set-output name=path::$F" | |
echo "::set-output name=name::$(basename $F)" |