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:
          prepare: |
            pkg install -y gmake
          run: |
            ./configure
            gmake
            gmake check
26 systems个系统
10 architectures种架构
54 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: the workspace syncs between them, and an x86_64 guest is accelerated by the runner's /dev/kvm while every other architecture is emulated ubuntu-latest runner 内部运行的 QEMU 客户机:工作目录在两者之间同步;x86_64 客户机由 runner 的 /dev/kvm 硬件加速,其他架构则是软件模拟 runs-on: ubuntu-latest host $GITHUB_WORKSPACE actions/checkout /dev/kvm QEMU guest same path, same env prepare + run accel=kvm rsync copyback accel x86_64 -> kvm near-native other arches -> tcg emulated, much slower sync: rsync | sshfs | nfs | scp nat: "8080": "80"
  • 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 指定哪些跟着进去。
  • x86_64 runs on the metal; everything else is emulated. x86_64 跑在硬件上,其他架构是模拟出来的。 The runner's /dev/kvm is handed to the VM, so an x86_64 guest runs at close to native speed. Every other architecture -- aarch64, riscv64, powerpc64, sparc64, i386, loongarch64 -- is fully emulated by QEMU and is dramatically slower. Keep those jobs small and give them a generous timeout-minutes. runner 的 /dev/kvm 会交给虚拟机,所以 x86_64 客户机的速度接近原生。其他架构 —— aarch64riscv64powerpc64sparc64i386loongarch64 —— 全部由 QEMU 软件模拟, 慢得多。这类任务要控制规模,并给足 timeout-minutes
  • 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 ppc64le s390x i386 loongarch64 armv7
FreeBSD rsync scp sshfs nfs tar rsync scp sshfs nfs tar nfs scp tar nfs scp tar
OpenBSD rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar
NetBSD rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar scp sshfs nfs tar
DragonFly BSD rsync scp nfs tar
GhostBSD rsync scp sshfs nfs tar
MidnightBSD rsync scp sshfs nfs tar
NextBSD rsync scp nfs tar rsync scp nfs tar
HardenedBSD rsync scp sshfs nfs tar
OPNsense rsync scp nfs tar
Solaris rsync scp nfs tar
OmniOS rsync scp nfs tar
OpenIndiana rsync scp sshfs nfs tar
Tribblix rsync scp nfs tar
Haiku rsync scp
GNU Hurd rsync scp nfs tar rsync scp nfs tar
Ubuntu rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar
Debian rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp sshfs nfs tar
Alpine Linux rsync scp sshfs nfs tar rsync scp sshfs nfs tar
AlmaLinux rsync scp nfs tar rsync scp nfs tar rsync scp nfs tar rsync scp nfs tar
Rocky Linux rsync scp nfs tar rsync scp nfs tar rsync scp nfs tar rsync scp nfs tar
openEuler rsync scp sshfs nfs tar rsync scp sshfs nfs tar rsync scp nfs tar rsync scp sshfs nfs tar
BlissOS scp tar
ReactOS i386 tar
Redox OS tar
RISC OS armv7 tar
Plan 9 9p

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, nfs, taraarch64 rsync, scp, sshfs, nfs, tarriscv64 nfs, scp, tarpowerpc64 nfs, scp, tar
Shell默认 shell
The default login shell in FreeBSD(before 14.0) is tcsh. 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, nfs, taraarch64 rsync, scp, sshfs, nfs, tarriscv64 rsync, scp, sshfs, nfs, tarsparc64 rsync, scp, sshfs, nfs, tar
Shell默认 shell
The default login shell in OpenBSD is ksh.
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, nfs, taraarch64 rsync, scp, sshfs, nfs, tarriscv64 rsync, scp, sshfs, nfs, tarsparc64 scp, sshfs, nfs, tar
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, tar
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, tar
prepare exampleprepare 示例
pkg install -y socat

MidnightBSD

vmactions/midnightbsd-vm@v1

Default release默认版本
4.0.7 (5 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, sshfs, nfs, tar
Shell默认 shell
The default login shell in MidnightBSD is tcsh.
prepare exampleprepare 示例
mport install curl || true

NextBSD

vmactions/nextbsd-vm@v1

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

HardenedBSD

vmactions/hardenedbsd-vm@v1

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

OPNsense

vmactions/opnsense-vm@v1

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

Solaris

vmactions/solaris-vm@v1

Default release默认版本
11.4 (4 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 rsync, scp, nfs, tar
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, tar
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, tar
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, nfs, tari386 rsync, scp, nfs, tar
prepare exampleprepare 示例
apt-get install -y socat

Ubuntu

vmactions/ubuntu-vm@v1

Default release默认版本
24.04 (3 releases个版本)
Architectures支持架构
x86_64 aarch64 riscv64 ppc64le s390x
Sync同步方式
x86_64 rsync, scp, sshfs, nfs, taraarch64 rsync, scp, sshfs, nfs, tarriscv64 rsync, scp, sshfs, nfs, tarppc64le rsync, scp, sshfs, nfs, tars390x rsync, scp, sshfs, nfs, tar
prepare exampleprepare 示例
apt-get install -y socat

Debian

vmactions/debian-vm@v1

Default release默认版本
13 (2 releases个版本)
Architectures支持架构
x86_64 aarch64 riscv64 ppc64le
Sync同步方式
x86_64 rsync, scp, sshfs, nfs, taraarch64 rsync, scp, sshfs, nfs, tarriscv64 rsync, scp, sshfs, nfs, tarppc64le rsync, scp, sshfs, nfs, tar
prepare exampleprepare 示例
apt-get install -y socat

Alpine Linux

vmactions/alpine-vm@v1

Default release默认版本
3.24 (2 releases个版本)
Architectures支持架构
x86_64 aarch64
Sync同步方式
x86_64 rsync, scp, sshfs, nfs, taraarch64 rsync, scp, sshfs, nfs, tar
prepare exampleprepare 示例
apk add --no-cache socat

AlmaLinux

vmactions/almalinux-vm@v1

Default release默认版本
10 (2 releases个版本)
Architectures支持架构
x86_64 aarch64 ppc64le s390x
Sync同步方式
x86_64 rsync, scp, nfs, taraarch64 rsync, scp, nfs, tarppc64le rsync, scp, nfs, tars390x rsync, scp, nfs, tar
prepare exampleprepare 示例
dnf install -y socat

Rocky Linux

vmactions/rockylinux-vm@v1

Default release默认版本
10 (2 releases个版本)
Architectures支持架构
x86_64 aarch64 ppc64le s390x
Sync同步方式
x86_64 rsync, scp, nfs, taraarch64 rsync, scp, nfs, tarppc64le rsync, scp, nfs, tars390x rsync, scp, nfs, tar
prepare exampleprepare 示例
dnf 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, nfs, taraarch64 rsync, scp, sshfs, nfs, tarriscv64 rsync, scp, nfs, tarloongarch64 rsync, scp, sshfs, nfs, tar
prepare exampleprepare 示例
dnf install -y curl

BlissOS

vmactions/blissos-vm@v1

Default release默认版本
16 (3 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 scp, tar
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

ReactOS

vmactions/reactos-vm@v1

Default release默认版本
0.4.15 (1 releases个版本)
Architectures支持架构
i386
Sync同步方式
i386 tar
prepare exampleprepare 示例
ver

Redox OS

vmactions/redox-vm@v1

Default release默认版本
0.9.0 (1 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 tar
prepare exampleprepare 示例
uname -a

RISC OS

vmactions/riscos-vm@v1

Default release默认版本
5.30 (1 releases个版本)
Architectures支持架构
armv7
Sync同步方式
armv7 tar
prepare exampleprepare 示例
Echo anyvm

Plan 9

vmactions/plan9-vm@v1

Default release默认版本
11952 (2 releases个版本)
Architectures支持架构
x86_64
Sync同步方式
x86_64 9p
prepare exampleprepare 示例
echo anyvm

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