-
Notifications
You must be signed in to change notification settings - Fork 79
43 lines (40 loc) · 1.38 KB
/
vagrant-install.yaml
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
name: Vagrant install
on:
pull_request:
types: [opened, reopened, synchronize]
env:
LIBVIRT_DEFAULT_URI: "qemu:///system"
jobs:
main:
name: Build and deploy
runs-on:
- self-hosted
- Linux
- kvm
- vagrant
- equinix
steps:
- uses: actions/checkout@v3
# - name: Build Harvester artifacts
# run: |
# make
- name: Clone and checkout ipxe-examples
uses: actions/checkout@v3
with:
repository: harvester/ipxe-examples
ref: main
path: ipxe-example
- name: Remove OVMF.fd line if needed
run: |
if [ ! -f /usr/share/qemu/OVMF.fd ]; then
echo "Remove libvirt loader: can't find UEFI firmware"
sed 's/libvirt.loader.*/#libvirt.loader = /' -i ${{ env.GITHUB_WORKSPACE }}/ipxe-example/vagrant-pxe-harvester/Vagrantfile
fi
- name: Generate SSH keys
run: |
ssh-keygen -t rsa -q -N "" -f ${{ env.GITHUB_WORKSPACE }}/ipxe-example/harvester-installer/ci/terraform/tmp-ssh-key
- name: Set SSH key
run: |
export PUB_KEY=$(cat ${{ env.GITHUB_WORKSPACE }}/ipxe-example/harvester-installer/ci/terraform/tmp-ssh-key.pub)
yq e -i ".harvester_config.ssh_authorized_keys += [ strenv(PUB_KEY) ]" \
${{ env.GITHUB_WORKSPACE }}/ipxe-example/vagrant-pxe-harvester/settings.yml