Can I run incus from Github Actions to spin up an archlinux vm?

name: Dotfiles CI
on:
  - push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install incus
        run: |
          curl https://pkgs.zabbly.com/get/incus-stable | sudo sh -x

      - name: Reset the firewall
        run: |
          sudo nft flush ruleset

      - name: Init incus
        run: sudo incus admin init --auto

      - name: Launch an arch container
        run: sudo incus launch images:b0b987c75be9 archbox

      - name: Install ansible on arch
        run: |
          sleep 10
          sudo incus exec archbox -- pacman -Syu ansible --noconfirm

Here you go :slight_smile:

2 Likes