Re-add KVM group permission #106
Workflow file for this run
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: Publish Windows 11 FR input (Ubuntu) | |
| 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 make zip unzip tar p7zip dos2unix openssh-client 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: Change locales to fr-FR | |
| run: sed -i 's/Locale>en-US</Locale>fr-FR</' ./windows-11-24h2-uefi/autounattend.xml | |
| - name: Configure version for release | |
| run: sed -i 's/0.0.0/$(date +%Y%m%d.%H%M%S)/' box-metadata.sh | |
| - name: Create cache dir for packer | |
| run: mkdir -p ${{ github.workspace }}/.cache | |
| - 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 | |
| env: | |
| PACKER_GITHUB_API_TOKEN: ${{ secrets.PACKER_GITHUB_API_TOKEN }} | |
| run: PACKER_CACHE_DIR=${{ github.workspace }}/.cache make build-windows-11-24h2-uefi-libvirt | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: box | |
| path: | | |
| *.box | |
| *.log | |
| *.box.json |