Skip to content

Commit

Permalink
v3.0: Upgrade vagrant-action and use virtualbox
Browse files Browse the repository at this point in the history
  • Loading branch information
hummeltech committed Nov 6, 2024
1 parent e0a7352 commit 83d1913
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
box:
- generic/freebsd13
- generic/freebsd14
- freebsd/FreeBSD-13.4-STABLE
- freebsd/FreeBSD-14.1-STABLE
fail-fast: false
steps:
- name: Checkout code
Expand All @@ -27,6 +29,7 @@ jobs:
with:
box: ${{ matrix.box }}
cpus: ${{ env.CPUS }}
provider: virtualbox

- name: Run Test (uname) (VM)
run: |
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:
strategy:
matrix:
box:
- freebsd/FreeBSD-13.3-STABLE
- freebsd/FreeBSD-13.4-STABLE
- freebsd/FreeBSD-14.1-STABLE
- generic/freebsd13
- generic/freebsd14
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
This action allows the running of command-line programs via the `bash` shell of FreeBSD VMs provisioned with Vagrant using the [run](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun) keyword. This also works with composite actions which exclusively use the `run` keyword (and/or call other composite actions which also do so.)

#### *This action is currently only tested with these boxes (but will probably also work with others):*
* `freebsd/FreeBSD-13.3-STABLE` (`macos-13` only)
* `freebsd/FreeBSD-14.1-STABLE` (`macos-13` only)
* `freebsd/FreeBSD-13.4-STABLE` (`virtualbox` provider only)
* `freebsd/FreeBSD-14.1-STABLE` (`virtualbox` provider only)
* `generic/freebsd13`
* `generic/freebsd14`

Expand All @@ -15,7 +15,7 @@ This action allows the running of command-line programs via the `bash` shell of
1. Provision a `FreeBSD VM` using the specified `box` (with 2 CPUs & 2GB of RAM)
```yaml
- name: Provision VM
uses: hummeltech/freebsd-vagrant-action@v2
uses: hummeltech/freebsd-vagrant-action@v3
with:
box: freebsd/FreeBSD-14.1-STABLE
cpus: 2
Expand Down
20 changes: 19 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ name: Start FreeBSD Vagrant Box
description: Allow running command-line programs via bash shell of FreeBSD VMs provisioned with Vagrant using the run keyword.

inputs:
boot_timeout:
default: 1800
description: VM Boot Timeout
type: string
box:
default: generic/freebsd14
description: Vagrant Box
type: string
connect_timeout:
default: 30
description: VM SSH Connect Timeout
type: string
cpus:
default: 2
description: VM CPUs
Expand All @@ -31,6 +39,13 @@ inputs:
sudo pkg clean --all --yes;
description: Command(s) to run before packaging Vagrant Box (double quotation marks are not allowed)
type: string
provider:
description: Vagrant provider to use, defaults to virtualbox
default: virtualbox
options:
- libvirt
- virtualbox
type: choice
provision_commands:
default: >-
sysrc update_motd=NO;
Expand Down Expand Up @@ -69,12 +84,15 @@ runs:
using: composite
steps:
- name: Start FreeBSD Vagrant Box
uses: hummeltech/vagrant-action@v1
uses: hummeltech/vagrant-action@v2
with:
boot_timeout: ${{ inputs.boot_timeout }}
box: ${{ inputs.box }}
connect_timeout: ${{ inputs.connect_timeout }}
cpus: ${{ inputs.cpus }}
memory: ${{ inputs.memory }}
pre_package_commands: ${{ inputs.pre_package_commands }}
provider: ${{ inputs.provider }}
provision_commands: ${{ inputs.provision_commands }}
save_box_to_cache: ${{ inputs.save_box_to_cache }}
use_cached_box: ${{ inputs.use_cached_box }}
Expand Down

0 comments on commit 83d1913

Please sign in to comment.