Use this action to run your CI in OmniOS.
The github workflow only supports Ubuntu, Windows and MacOS. But what if you need to use OmniOS?
All the supported releases are here:
Release | x86_64 | aarch64(arm64) |
---|---|---|
r151052 | ✅ | ❌ |
r151050 | ✅ | ❌ |
r151048 | ✅ | ❌ |
r151046 | ✅ | ❌ |
name: Test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
name: A job to run test in OmniOS
env:
MYTOKEN : ${{ secrets.MYTOKEN }}
MYTOKEN2: "value2"
steps:
- uses: actions/checkout@v4
- name: Test in OmniOS
id: test
uses: vmactions/omnios-vm@
with:
envs: 'MYTOKEN MYTOKEN2'
usesh: true
prepare: |
pkg install socat
run: |
if [ -n "test" ]; then
echo "false"
fi
if [ "test" ]; then
echo "test"
fi
pwd
ls -lah
whoami
env
psrinfo -vp
cat /etc/release
psrinfo -v
echo "::memstat" | mdb -k
echo "OK"
The latest major version is: , which is the most recommended to use. (You can also use the latest full version:
)
If you are migrating from the previous v0
, please change the runs-on:
to runs-on: ubuntu-latest
The envs: 'MYTOKEN MYTOKEN2'
is the env names that you want to pass into the vm.
The run: xxxxx
is the command you want to run in the vm.
The env variables are all copied into the VM, and the source code and directory are all synchronized into the VM.
The working dir for run
in the VM is the same as in the Host machine.
All the source code tree in the Host machine are mounted into the VM.
All the GITHUB_*
as well as CI=true
env variables are passed into the VM.
So, you will have the same directory and same default env variables when you run
the CI script.
The code is shared from the host to the VM via rsync
by default, you can choose to use sshfs
or nfs
to share code instead.
...
steps:
- uses: actions/checkout@v4
- name: Test
id: test
uses: vmactions/omnios-vm@
with:
envs: 'MYTOKEN MYTOKEN2'
usesh: true
sync: sshfs # or: nfs
prepare: |
pkg install socat
...