Skip to content

Commit c8d1a12

Browse files
committed
ci: Load br_netfilter module in linux runners
Signed-off-by: Swagat Bora <[email protected]>
1 parent 832c455 commit c8d1a12

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.github/workflows/job-test-in-container.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ jobs:
7070
- name: "Init: expose GitHub Runtime variables for gha"
7171
uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3.1.0
7272

73+
- name: "Init: install br-netfilter"
74+
run: |
75+
# This ensures that bridged traffic goes through netfilter
76+
sudo apt-get update -qq
77+
sudo apt-get install -qq nftables
78+
sudo modprobe br-netfilter
7379
- name: "Init: register QEMU (tonistiigi/binfmt)"
7480
run: |
7581
# `--install all` will only install emulation for architectures that cannot be natively executed

.github/workflows/job-test-in-host.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ jobs:
156156
sudo apt-get install -qq expect
157157
echo "::endgroup::"
158158
159+
# This ensures that bridged traffic goes through netfilter
160+
sudo apt-get install -qq nftables
161+
sudo modprobe br-netfilter
162+
159163
- if: ${{ contains(inputs.runner, 'windows') && env.SHOULD_RUN == 'yes' }}
160164
name: "Init (windows): prepare host"
161165
env:

.github/workflows/job-test-in-lima.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ jobs:
6666
lima sudo dnf -q -y install docker-ce --nobest
6767
lima sudo systemctl enable --now docker
6868
69+
- name: "Init: install br-netfilter in guest VM"
70+
run: |
71+
# This ensures that bridged traffic goes through netfilter
72+
lima sudo dnf -q -y install nftables
73+
lima sudo modprobe br-netfilter
74+
6975
- name: "Init: configure the host to use dockerd in the guest VM"
7076
run: |
7177
set -eux

0 commit comments

Comments
 (0)