Test minimal instructions to build images #1
This file contains hidden or 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: Build Windows 11 | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Enable vagrant repo and update sources | |
| run: | | |
| wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
| sudo apt -yq update | |
| - name: Install dependencies | |
| run: DEBIAN_FRONTEND=noninteractive sudo apt -yq install qemu-system-x86 xorriso p7zip dos2unix vagrant libvirt-dev | |
| - name: Install vagrant dependencies | |
| run: vagrant plugin install vagrant-libvirt | |
| - name: Maximize build space | |
| uses: easimon/maximize-build-space@master | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Reduce wget verbosity | |
| run: sed -i 's/wget/wget -nv/' provision-drivers.sh | |
| - name: Create cache dir and temp dir for packer | |
| run: mkdir -p ${{ github.workspace }}/{.cache,.temp} | |
| - name: Enable KVM group perms | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Build vagrant box | |
| run: PACKER_CACHE_DIR=${{ github.workspace }}/.cache TMPDIR=${{ github.workspace }}/.temp make build-windows-11-24h2-uefi-libvirt |