Skip to content

Commit 72bdf7c

Browse files
committed
(maint) new acceptance inputs, disable_apparmor and kernel_modules
1 parent da72a0a commit 72bdf7c

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/module_acceptance.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ on:
1414
required: false
1515
default: ''
1616
type: "string"
17-
17+
kernel_modules:
18+
description: "Volume map host kernel /lib/modules into docker container"
19+
default: true
20+
type: boolean
21+
disable_apparmor:
22+
description: "Disable and stop apparmor"
23+
default: false
24+
type: boolean
1825

1926
jobs:
2027

@@ -68,6 +75,16 @@ jobs:
6875
- name: "Checkout"
6976
uses: "actions/checkout@v4"
7077

78+
- name: "Disable Apparmor"
79+
if: ${{ inputs.disable_apparmor }}
80+
run: |
81+
if command -v apparmor_parser >/dev/null ; then
82+
sudo find /etc/apparmor.d/ -maxdepth 1 -type f -exec ln -sf {} /etc/apparmor.d/disable/ \;
83+
sudo apparmor_parser -R /etc/apparmor.d/disable/* || true
84+
sudo systemctl disable apparmor
85+
sudo systemctl stop apparmor
86+
fi
87+
7188
- name: "Setup ruby"
7289
uses: "ruby/setup-ruby@v1"
7390
with:
@@ -82,7 +99,7 @@ jobs:
8299
83100
- name: "Provision environment"
84101
run: |
85-
if [[ "${{matrix.platforms.provider}}" == "docker" ]]; then
102+
if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then
86103
DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}"
87104
else
88105
DOCKER_RUN_OPTS=''

0 commit comments

Comments
 (0)