Skip to content

Commit

Permalink
(maint) new acceptance inputs, disable_apparmor and kernel_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed May 2, 2024
1 parent 8d4fb1b commit 9623061
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/module_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ on:
required: false
default: ''
type: "string"

kernel_modules:
description: "Volume map host kernel /lib/modules into docker container"
default: true
type: boolean
disable_apparmor:
description: "Disable and stop apparmor"
default: false
type: boolean

jobs:

Expand Down Expand Up @@ -68,6 +75,16 @@ jobs:
- name: "Checkout"
uses: "actions/checkout@v4"

- name: "Disable Apparmor"
if: ${{ inputs.disable_apparmor }}
run: |
if command -v apparmor_parser >/dev/null ; then
sudo find /etc/apparmor.d/ -maxdepth 1 -type f -exec ln -sf {} /etc/apparmor.d/disable/ \;
sudo apparmor_parser -R /etc/apparmor.d/disable/* || true
sudo systemctl disable apparmor
sudo systemctl stop apparmor
fi
- name: "Setup ruby"
uses: "ruby/setup-ruby@v1"
with:
Expand All @@ -82,7 +99,7 @@ jobs:
- name: "Provision environment"
run: |
if [[ "${{matrix.platforms.provider}}" == "docker" ]]; then
if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then
DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}"
else
DOCKER_RUN_OPTS=''
Expand Down

0 comments on commit 9623061

Please sign in to comment.