ci: move to self-hosted action runner #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ${GITHUB_WORKSPACE}/ipxe-example/vagrant-pxe-harvester/Vagrantfile | |
fi | |
- name: Generate SSH keys | |
run: | | |
ssh-keygen -t rsa -q -N "" -f ${GITHUB_WORKSPACE}/ipxe-example/harvester-installer/ci/terraform/tmp-ssh-key | |
- name: Set SSH key | |
run: | | |
export PUB_KEY=$(cat ${GITHUB_WORKSPACE}/ipxe-example/harvester-installer/ci/terraform/tmp-ssh-key.pub) | |
yq e -i ".harvester_config.ssh_authorized_keys += [ strenv(PUB_KEY) ]" \ | |
${GITHUB_WORKSPACE}/ipxe-example/vagrant-pxe-harvester/settings.yml |