From 7abf76f2a0f5daefd4a780fce8d4b3c1e29d83be Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 15 Feb 2024 15:50:49 +0100 Subject: [PATCH] chore: let composite action's caller install kernel headers. Signed-off-by: Federico Di Pierro --- README.md | 3 ++- action.yml | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d6ef9e6..f16c5d1 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Therefore, running Falco tests in your Github workflow is as easy as adding this # Default: 'false'. test-k8saudit: 'true' - # Whether to test drivers. + # Whether to test drivers. Requires kernel headers to be installed. # Default: 'false'. test-drivers: 'true' @@ -80,6 +80,7 @@ Therefore, running Falco tests in your Github workflow is as easy as adding this > __NOTE:__ Since we don't use annotated tags, one cannot use eg: falcosecurity/testing@v0, but only either exact tag name, branch name or commit hash. +> __NOTE:__ The action implies it gets ran on ubuntu or debian like distro. It uses `apt` to install some deps. ## Keep tests updated with the latest Falco version diff --git a/action.yml b/action.yml index c84baca..2ed05f2 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ inputs: required: false default: 'false' test-drivers: - description: 'Whether to run drivers tests. Default disabled.' + description: 'Whether to run drivers tests. Requires kernel headers to be installed. Default disabled.' required: false default: 'false' static: @@ -67,15 +67,11 @@ runs: ${{ inputs.sudo }} falcoctl artifact install cloudtrail-rules - name: Install dependencies for falco-driver-loader tests - if: ${{ inputs.arch == 'x86_64' && inputs.test-drivers == 'true' }} + if: ${{ inputs.test-drivers == 'true' }} shell: bash run: | ${{ inputs.sudo }} apt update -y - ${{ inputs.sudo }} apt install -y --no-install-recommends build-essential clang make llvm gcc dkms linux-headers-$(uname -r) - - - name: Install dependencies for falco-driver-loader tests - if: ${{ inputs.arch == 'aarch64' && inputs.test-drivers == 'true' }} - uses: self-actuated/get-kernel-sources@master + ${{ inputs.sudo }} apt install -y --no-install-recommends build-essential clang make llvm gcc dkms - name: Run tests working-directory: ${{ github.action_path }}