GitHub Actions

Run your CI on the systems GitHub does not offer.

在 GitHub 不提供的系统上跑 CI。

Hosted runners give you Ubuntu, Windows and macOS. These actions boot a real, fully installed operating system under QEMU inside an ordinary ubuntu-latest runner, sync your checked-out source tree into it, and run your build and test commands there. No self-hosted runner, no container trickery, no cross-compilation guesswork.

官方 runner 只有 Ubuntu、Windows 和 macOS。这些 action 在一台普通的 ubuntu-latest runner 里用 QEMU 启动一台真实、装好的操作系统, 把你 checkout 出来的源码同步进去,在里面跑构建和测试。不需要 self-hosted runner,不靠容器取巧,也不用交叉编译连蒙带猜。

.github/workflows/test.yml
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: vmactions/freebsd-vm@v1
        with:
          usesh: true
          prepare: |
            pkg install -y gmake
          run: |
            ./configure
            gmake
            gmake check
14 systems个系统
7 architectures种架构
27 OS-arch combinations个系统-架构组合

How it works工作原理

A whole machine, inside the runner you already have

在你已有的 runner 里,跑一整台机器

A QEMU guest running inside the ubuntu-latest runner, with the workspace synced between them ubuntu-latest runner 内部运行的 QEMU 客户机,工作目录在两者之间同步 runs-on: ubuntu-latest host $GITHUB_WORKSPACE actions/checkout QEMU guest same path, same env prepare + run rsync copyback sync: rsync | sshfs | nfs | scp nat: "8080": "80" arch: x86_64 | aarch64 | riscv64 | ...
  • Your workspace goes in, and comes back out. 工作目录同步进去,再同步回来。 The whole checked-out tree is shared into the guest, and changes made inside come back to the host. Pick rsync, sshfs, nfs or scp -- or turn syncing off entirely. 整棵 checkout 出来的目录树都会共享进客户机,在里面产生的改动 也会同步回宿主机。可以选 rsyncsshfsnfsscp,也可以完全关掉同步。
  • Same directory, same environment. 同样的目录,同样的环境变量。 The working directory inside the VM matches the host. Every GITHUB_* variable and CI=true comes along; you name which of your own secrets follow via envs. 虚拟机里的工作目录和宿主机一致。所有 GITHUB_* 变量和 CI=true 都会带进去;你自己的 secret 则通过 envs 指定哪些跟着进去。
  • It is a real machine, so you can look inside. 它是台真机器,出事能进去看。 Forward ports with nat, size it with mem and cpu, run later workflow steps directly in the guest with a custom shell, and open a VNC session at the moment a build fails. nat 转发端口,用 memcpu 调规格,用自定义 shell 让后续 step 直接在客户机里跑, 构建失败的那一刻还能开 VNC 进去看现场。

Coverage覆盖矩阵

Every system, every architecture

所有系统,所有架构

Generated from the action repositories themselves, so it cannot drift from what actually ships.

直接从各 action 仓库生成,不会和实际发布的内容对不上。

System系统 x86_64 aarch64 riscv64 powerpc64 sparc64 i386 loongarch64
FreeBSD rsync scp sshfs nfs rsync scp sshfs nfs nfs scp nfs scp
OpenBSD rsync scp sshfs nfs rsync scp sshfs nfs rsync scp sshfs nfs rsync scp sshfs nfs
NetBSD rsync scp sshfs nfs rsync scp sshfs nfs rsync scp sshfs nfs scp sshfs nfs
DragonFly BSD rsync scp nfs
GhostBSD rsync scp sshfs nfs
MidnightBSD rsync scp sshfs nfs
Solaris rsync scp nfs
OmniOS rsync scp nfs
OpenIndiana rsync scp sshfs nfs
Tribblix rsync scp nfs
Haiku rsync scp
GNU Hurd rsync scp nfs rsync scp nfs
openEuler rsync scp sshfs nfs rsync scp sshfs nfs rsync scp nfs rsync scp sshfs nfs
BlissOS scp

Each cell lists the sync methods that combination supports.每个格子列出该组合支持的同步方式。

Systems系统

Pick one and paste it in

挑一个,粘进去就能用

Each action ships many releases; the default is listed here. See the builder repository for the full release table.

每个 action 都带多个版本,这里列的是默认版本。完整版本表见对应的 builder 仓库。

FreeBSD

vmactions/freebsd-vm@v1

Default release默认版本
15.1 (12 releases个版本)
Architectures支持架构
x86_64 aarch64 riscv64 powerpc64
Sync同步方式
x86_64 rsync, scp, sshfs, nfsaarch64 rsync, scp, sshfs, nfsriscv64 nfs, scppowerpc64 nfs, scp
Shell默认 shell
The default shell in FreeBSD(before 14.0) is tcsh, if you want to use sh to execute the run script, please set usesh to true. https://docs.freebsd.org/en/articles/linux-users/#shells

OpenBSD

vmactions/openbsd-vm@v1

Default release默认版本
7.9 (8 releases个版本)
Architectures支持架构
x86_64 aarch64 riscv64 sparc64
Sync同步方式
x86_64 rsync, scp, sshfs, nfsaarch64 rsync, scp, sshfs, nfsriscv64 rsync, scp, sshfs, nfssparc64 rsync, scp, sshfs, nfs
Shell默认 shell
The default shell in OpenBSD is ksh, if you want to use sh to execute the run script, please set usesh to true.
prepare exampleprepare 示例
pkg_add curl

NetBSD

vmactions/netbsd-vm@v1

Default release默认版本
11.0 (8 releases个版本)
Architectures支持架构
x86_64 aarch64 riscv64 sparc64
Sync同步方式
x86_64 rsync, scp, sshfs, nfsaarch64 rsync, scp, sshfs, nfsriscv64 rsync, scp, sshfs, nfssparc64 scp, sshfs, nfs
prepare exampleprepare 示例
/usr/sbin/pkg_add -u curl

DragonFly BSD

vmactions/dragonflybsd-vm@v1

Default release默认版本
6.4.2 (3 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, nfs
prepare exampleprepare 示例
pkg install -y socat

GhostBSD

vmactions/ghostbsd-vm@v1

Default release默认版本
26.1 (3 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, sshfs, nfs
prepare exampleprepare 示例
pkg install -y socat

MidnightBSD

vmactions/midnightbsd-vm@v1

Default release默认版本
4.0.6 (4 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, sshfs, nfs
Shell默认 shell
The default shell in MidnightBSD is tcsh, if you want to use sh to execute the run script, please set usesh to true.
prepare exampleprepare 示例
mport install curl || true

Solaris

vmactions/solaris-vm@v1

Default release默认版本
11.4 (4 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, nfs
prepare exampleprepare 示例
pkgutil -y -i socat

OmniOS

vmactions/omnios-vm@v1

Default release默认版本
r151058 (7 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, nfs
prepare exampleprepare 示例
pkg install socat

OpenIndiana

vmactions/openindiana-vm@v1

Default release默认版本
202604 (2 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, sshfs, nfs
prepare exampleprepare 示例
pkg install socat

Haiku

vmactions/haiku-vm@v1

Default release默认版本
r1beta5 (1 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp
prepare exampleprepare 示例
pkgman install -y curl

GNU Hurd

vmactions/hurd-vm@v1

Default release默认版本
2025 (1 releases个版本)
Architectures支持架构
x86_64 i386
Sync同步方式
x86_64 rsync, scp, nfsi386 rsync, scp, nfs
prepare exampleprepare 示例
apt-get install -y socat

openEuler

vmactions/openeuler-vm@v1

Default release默认版本
24.03-LTS-SP4 (3 releases个版本)
Architectures支持架构
x86_64 aarch64 riscv64 loongarch64
Sync同步方式
x86_64 rsync, scp, sshfs, nfsaarch64 rsync, scp, sshfs, nfsriscv64 rsync, scp, nfsloongarch64 rsync, scp, sshfs, nfs
prepare exampleprepare 示例
dnf install -y curl

BlissOS

vmactions/blissos-vm@v1

Default release默认版本
16 (3 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 scp
Shell默认 shell
The default shell in BlissOS is Android's mksh (/system/bin/sh). There is no bash in the VM.
prepare exampleprepare 示例
uname -a

Options可选项

What you can turn on

可以打开的开关

release / arch

Choose the release and the CPU architecture. A leading part such as 13 selects the newest 13.x.

选版本和 CPU 架构。只写前缀(比如 13)会选中最新的 13.x

sync

Share the workspace over rsync, sshfs, nfs or scp -- or not at all.

rsyncsshfsnfsscp 共享工作目录,也可以完全不共享。

envs

Name the environment variables and secrets that should follow your code into the VM.

指定哪些环境变量和 secret 跟着代码一起进虚拟机。

nat

Forward TCP and UDP ports between the runner and the guest.

在 runner 和客户机之间转发 TCP / UDP 端口。

mem / cpu

Size the machine. It takes every core of the host by default.

调整机器规格。默认会用满宿主机的所有核心。

custom shell

Run later workflow steps straight inside the guest, with the workspace kept in step on both sides.

让后续的 workflow step 直接在客户机里跑,两边的工作目录保持同步。

cache-after-prepare

Cache the VM image once prepare has finished, so later runs skip installing packages entirely.

prepare 跑完后缓存虚拟机镜像,后续构建直接跳过装包。

debug-on-error

When a build fails, the action opens a VNC session and waits for you, instead of throwing the machine away.

构建失败时,action 会开一个 VNC 会话等你进去,而不是直接把机器扔掉。

AI readyAI 可用

Let the agent write the workflow

让 agent 帮你写 workflow

The vmactions-ci skill teaches a coding agent the whole interface: the action names, every input, the per-system default shell and package manager, and the usual footguns. Ask for "tests on NetBSD aarch64" and you get a workflow that runs.

vmactions-ci skill 把整套接口喂给编程 agent:action 名字、全部参数、每个系统的默认 shell 和包管理器,以及那些常见的坑。你说一句"在 NetBSD aarch64 上跑测试", 它给你一份能跑的 workflow。

install
# Claude Code
git clone https://github.com/vmactions/vmactions-skill \
  ~/.claude/skills/vmactions-ci

# Codex / Copilot CLI / Gemini CLI
git clone https://github.com/vmactions/vmactions-skill \
  ~/.agents/skills/vmactions-ci