Skip to content

ci: move to self-hosted action runner #3

ci: move to self-hosted action runner

ci: move to self-hosted action runner #3

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