Description
For everyday development, containers simplify the workflow by providing consistent, isolated, reproducible and portable environments. Although there’s an existing FreeBSD VM action in GH marketplace: https://github.com/marketplace/actions/freebsd-vm, it often takes hours of fiddling to get it working for one repository, and that setup rarely transfers cleanly to the next project.
It would be great to have something like a cbsd/freebsd-oci
GitHub Action that spins up a FreeBSD 14+ OCI-compliant machine on the GitHub Actions Ubuntu runner with sensible defaults in true pit-of-success fashion.. This could be built on cbsd’s existing OCI functionality (https://github.com/cbsd/cbsd/blob/f1d1360/share/docs/general/cbsd_oci.md), but with a focus on a more familiar, docker/podman-like CLI experience for regular (non-sysadmin) developers our in the wild.
Anticipated Usage Example
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup FreeBSD container environment
uses: cbsd/freebsd-oci@v1
with:
arch: amd64 # or i386, arm64, etc.
version: 14.2
# run containers with familiar CLI
- name: Run tests in FreeBSD container
run: |
cbsd run --rm -v ${{ github.workspace }}:/repo -w /repo freebsd:14.2 ./run-tests.sh
# akin to the familiar:
podman run --rm -v ${{ github.workspace }}:/repo -w /repo ubuntu:25.04 ./run-tests.sh
The action would launch a FreeBSD VM (using the specified version
and arch
) on the GitHub Actions Ubuntu runner; e.g. KVM for native architectures and QEMU+KVM for others. cbsd would run OCI-compliant containers inside that VM bridging volume mounts (-v
in example) and networking from linux host.