Skip to content

Commit

Permalink
ci: move to self-hosted action runner [CI SKIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
bk201 committed Dec 28, 2023
1 parent 87c2b5c commit 20cfdeb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- master
- 'v**'
pull_request:
# pull_request:

jobs:
build:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/vagrant-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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: |
# export USE_LOCAL_IMAGES=true
# make
- name: Clone and checkout ipxe-examples
run: |
cd $HOME
if [ ! -f ipxe-examples ]; then
git clone https://github.com/harvester/ipxe-examples.git
fi
cd ipxe-examples
git reset && git checkout .
git clean -fd
git pull
- name: Clean up previous vagrant deployment
run: |
cd $HOME/ipxe-example/vagrant-pxe-harvester
vagrant destroy -f --parallel
- 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 $HOME/ipxe-example/vagrant-pxe-harvester/Vagrantfile
fi
- name: Generate SSH keys
run: |
ssh-keygen -t rsa -q -N "" -f ./ci/terraform/tmp-ssh-key
- name: Set SSH key in ipxe-example settings
run: |
export PUB_KEY=$(cat ./ci/terraform/tmp-ssh-key.pub)
yq e -i ".harvester_config.ssh_authorized_keys += [ strenv(PUB_KEY) ]" $HOME/ipxe-example/vagrant-pxe-harvester/settings.yml

0 comments on commit 20cfdeb

Please sign in to comment.