File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Fedora
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+
7+ jobs :
8+ fedora :
9+ runs-on : ubuntu-24.04
10+ steps :
11+ - name : Check out code
12+ uses : actions/checkout@v4
13+
14+ - name : " Install QEMU"
15+ run : |
16+ set -eux
17+ sudo apt-get update
18+ sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
19+ sudo modprobe kvm
20+ # `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
21+ sudo chown $(whoami) /dev/kvm
22+ - name : " Install Lima"
23+ run : |
24+ set -eux
25+ LIMA_VERSION=$(curl -fsSL https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)
26+ curl -fsSL https://github.com/lima-vm/lima/releases/download/${LIMA_VERSION}/lima-${LIMA_VERSION:1}-Linux-x86_64.tar.gz | sudo tar Cxzvf /usr/local -
27+ - name : " Cache ~/.cache/lima"
28+ uses : actions/cache@v4
29+ with :
30+ path : ~/.cache/lima
31+ key : lima-${{ env.LIMA_VERSION }}
32+
33+ - name : " Start an instance of Fedora"
34+ run : |
35+ set -eux
36+ limactl start --name=default --cpus=1 --memory=1 --network=lima:user-v2 template://fedora
37+ lima sudo dnf install -y httpd
38+ lima sudo systemctl enable --now httpd
39+ - name : " Start another instance of Fedora"
40+ run : |
41+ set -eux
42+ limactl start --name=another --cpus=1 --memory=1 --network=lima:user-v2 template://fedora
43+ limactl shell another curl http://lima-default.internal
You can’t perform that action at this time.
0 commit comments