Skip to content

Instantly share code, notes, and snippets.

@konstruktoid
Created October 15, 2022 21:31
Show Gist options
  • Save konstruktoid/11459e78a6ff58e5772f5ca390578832 to your computer and use it in GitHub Desktop.
Save konstruktoid/11459e78a6ff58e5772f5ca390578832 to your computer and use it in GitHub Desktop.
Vagrantfile for local testing of Github workflows
$script = <<-'SCRIPT'
apt-get update
curl -sSL get.docker.com | sh && sudo addgroup vagrant docker
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | bash
SCRIPT
Vagrant.configure("2") do |config|
config.vbguest.installer_options = { allow_kernel_upgrade: true }
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
v.customize ["modifyvm", :id, "--uart1", "0x3F8", "4"]
v.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]
end
config.vm.define "focal" do |focal|
focal.ssh.extra_args = ["-o","ConnectTimeout=600"]
focal.ssh.insert_key = true
focal.vm.boot_timeout = 600
focal.vm.box = "ubuntu/focal64"
focal.vm.hostname = "focal"
focal.vm.provision "shell", inline: $script
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment