-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
101 lines (97 loc) · 2.89 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
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
options:
- 2
- 4
- 8
type: choice
memory:
default: 2048
description: VM Memory
options:
- 1024
- 2048
- 4096
- 8192
type: choice
pre_package_commands:
default: >-
find ${{ github.workspace }} -mindepth 1 -delete;
find ${{ runner.temp }} -mindepth 1 -delete;
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;
service motd onestop;
rm -f /var/run/motd;
chmod -x /usr/bin/fortune;
export ASSUME_ALWAYS_YES=yes;
pkg bootstrap -f;
pkg upgrade;
pkg install bash rsync;
echo 'AcceptEnv *' >> /etc/ssh/sshd_config;
service sshd restart;
mkdir -p ${{ github.workspace }};
chown vagrant:vagrant ${{ github.workspace }};
mkdir -p ${{ runner.temp }};
chown vagrant:vagrant ${{ runner.temp }};
description: Command(s) to run for provisioning (double quotation marks are not allowed)
type: string
save_box_to_cache:
description: Save Vagrant Box to GitHub Actions Cache
type: boolean
use_cached_box:
description: Use Vagrant Box from GitHub Actions Cache
type: boolean
vagrant_box_descriptor:
default: /tmp/packaged.box
description: Vagrant Box Descriptor <name, url, or path>
type: string
vagrant_ssh_username:
default: vagrant
description: SSH Username for `vagrant ssh`
type: string
runs:
using: composite
steps:
- name: Start FreeBSD Vagrant Box
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 }}
vagrant_box_descriptor: ${{ inputs.vagrant_box_descriptor }}
vagrant_ssh_username: ${{ inputs.vagrant_ssh_username }}