-
Notifications
You must be signed in to change notification settings - Fork 743
Expand file tree
/
Copy pathaction.yml
More file actions
31 lines (29 loc) · 936 Bytes
/
action.yml
File metadata and controls
31 lines (29 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 'Lima VM Setup'
description: 'Install Lima, enable KVM, start a VM and copy the CRIU source into it'
inputs:
template:
description: 'Lima VM template name (e.g. fedora, centos-stream-9)'
required: true
cache-key-prefix:
description: 'Prefix for the Lima image cache key'
required: true
runs:
using: composite
steps:
- name: Install Lima
uses: lima-vm/lima-actions/setup@v1
- name: Cache Lima images
uses: actions/cache@v4
with:
path: ~/.cache/lima
key: ${{ inputs.cache-key-prefix }}-${{ github.sha }}
restore-keys: ${{ inputs.cache-key-prefix }}-
- name: Start VM
shell: bash
run: limactl start --plain --name=default --cpus=4 --memory=12 template://${{ inputs.template }}
- name: Copy source into VM
shell: bash
run: |
lima sudo mkdir -p /home/criu
lima sudo chown "$(lima whoami)" /home/criu
limactl copy -r . default:/home/criu