This GitHub Action launches a Firecracker VM running FreeBSD. Typical boot time is 10-15 seconds.
- name: Launch Firecracker VM
uses: acj/freebsd-firecracker-action@v0.1.1
with:
run: |
echo "Hello from inside the VM!"This action uses a FreeBSD kernel, rootfs, and Firecracker binary from freebsd-firecracker. These include patches to make FreeBSD boot in Firecracker on the GitHub Actions runner hardware.
- Boots a VM in ~12 seconds in GitHub Actions
- Supports FreeBSD 14.0-RELEASE
- Supports Intel and AMD CPUs
With the pre-run input, you can run commands outside of the VM after the VM is up and running. This is useful for copying files into the VM, for example.
- name: Launch Firecracker VM
uses: acj/freebsd-firecracker-action@v0.1.1
with:
pre-run: |
echo "Hello from outside the VM!"With the run input, you can run commands inside of the VM.
- name: Launch Firecracker VM
uses: acj/freebsd-firecracker-action@v0.1.1
with:
run: |
echo "Hello from inside the VM!"With the post-run input, you can run commands outside of the VM before the VM shuts down. This is useful for copying files out of the VM.
- name: Launch Firecracker VM
uses: acj/freebsd-firecracker-action@v0.1.1
with:
post-run: |
echo "Hello from outside the VM!"By default, the action will abort if the run script returns a non-zero exit code. You can override this behavior by setting continue-on-error to true, which will guarantee that the post-run script is run.
Prints extra information about the runner and the VM. Useful for debugging.
These inputs are provided for debugging and testing. You probably don't need to use them.
Overrides the URL where the FreeBSD kernel image is downloaded from.
Overrides the URL where the FreeBSD rootfs image is downloaded from.
Overrides the URL where the Firecracker binary is downloaded from.
Overrides the URL where the SSH private key for the VM is downloaded from.
Overrides the URL where the SSH public key for the VM is downloaded from.
By default, we use rsync to copy the current directory into the VM. A few items like the .git directory are excluded. You can customize this behavior by overriding the pre-run and post-run inputs. See the defaults in action.yml for a useful starting point.
Please be kind. We're all trying to do our best.
If you're having trouble, open an issue. If you'd like to suggest an improvement, open a PR. For bigger changes, please open an issue first so that we can discuss the idea.
Apache 2.0