-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: move to self-hosted action runner
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 ${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 |