Skip to content

Commit ab446bc

Browse files
committed
ci: disable AppArmor on daily and static workflows
AppArmor was disabled in CI workflows, but it was not disabled in the daily and static workflows. References #512
1 parent 3e183a9 commit ab446bc

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/daily.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: daily
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: '42 0 * * *' # daily at 00:42
5+
- cron: "42 0 * * *" # daily at 00:42
66
concurrency:
77
group: ${{ github.workflow }}
88
cancel-in-progress: true
@@ -19,6 +19,12 @@ jobs:
1919
test:
2020
runs-on: ubuntu-latest
2121
steps:
22+
- name: Disable AppArmor
23+
if: runner.os == 'Linux'
24+
run: |
25+
# Disable AppArmor for Ubuntu 23.10+.
26+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
27+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
2228
- uses: actions/checkout@v4
2329
- uses: actions/setup-go@v5
2430
with:
@@ -41,6 +47,12 @@ jobs:
4147
test-dev:
4248
runs-on: ubuntu-latest
4349
steps:
50+
- name: Disable AppArmor
51+
if: runner.os == 'Linux'
52+
run: |
53+
# Disable AppArmor for Ubuntu 23.10+.
54+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
55+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
4456
- uses: actions/checkout@v4
4557
with:
4658
ref: dev

.github/workflows/static.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: static
22

33
on:
44
push:
5-
branches: ['master']
5+
branches: ["master"]
66
workflow_dispatch:
77

88
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
@@ -22,6 +22,12 @@ jobs:
2222
url: ${{ steps.deployment.outputs.page_url }}
2323
runs-on: ubuntu-latest
2424
steps:
25+
- name: Disable AppArmor
26+
if: runner.os == 'Linux'
27+
run: |
28+
# Disable AppArmor for Ubuntu 23.10+.
29+
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
30+
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
2531
- name: Checkout
2632
uses: actions/checkout@v4
2733
- name: Setup Pages

0 commit comments

Comments
 (0)