-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.39 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test-Jaildk
on: [push]
jobs:
test:
runs-on: ubuntu-latest
name: Test jaildk on FreeBSD
steps:
- name: checkout
uses: actions/checkout@v4
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
id: testjaildk
with:
release: "14.1"
usesh: true
prepare: |
pkg install -y curl cpdup
run: |
freebsd-version
sysctl hw.model
sysctl hw.ncpu
sysctl hw.physmem
sysctl hw.usermem
ls -la
ifconfig em0 172.16.0.1/32 alias
ifconfig -a
set -x -e
sysrc jail_enable="YES"
cp .github/assets/jail.conf /etc/
cp src/jaildk.sh jaildk
sh jaildk setup /jail
fetch https://download.freebsd.org/ftp/releases/amd64/amd64/14.1-RELEASE/base.txz -o /jail/base/14.1-RELEASE-base.txz
mkdir -p /jail/base/14.1-RELEASE
tar -xf /jail/base/14.1-RELEASE-base.txz -C /jail/base/14.1-RELEASE --unlink
/jail/bin/jaildk create test
ls -l /jail/etc/test
/jail/bin/jaildk build test -m start
df -h /jail/build/test/etc
echo 'sshd_enable="Yes"' > /jail/build/test/usr/local/etc/rc.conf
chroot /jail/build/test /etc/rc.d/sshd keygen
/jail/bin/jaildk start test
/jail/bin/jaildk status | grep -E "test|Jail"