Skip to content

Commit 2adaf1d

Browse files
authoredApr 22, 2025
Merge pull request #3453 from jandubois/image-templates
Refactor images lists and default mounts into base templates
2 parents 95173c1 + 238a141 commit 2adaf1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+865
-893
lines changed
 

‎.github/workflows/test.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ jobs:
196196
- name: Validate jsonschema
197197
run: make schema-limayaml.json
198198
- name: Validate templates
199-
run: find -L templates -name '*.yaml' | xargs limactl validate
199+
# Can't validate base templates in `_default` because they have no images
200+
run: find -L templates -name '*.yaml' ! -path '*/_default/*' | xargs limactl validate
200201
- name: Install test dependencies
201202
# QEMU: required by Lima itself
202203
# bash: required by test-templates.sh (OS version of bash is too old)
@@ -208,7 +209,7 @@ jobs:
208209
run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu" >>$GITHUB_ENV
209210
- name: "Inject `no_timer_check` to kernel cmdline"
210211
# workaround to https://github.com/lima-vm/lima/issues/84
211-
run: ./hack/inject-cmdline-to-template.sh templates/default.yaml no_timer_check
212+
run: ./hack/inject-cmdline-to-template.sh templates/_images/ubuntu.yaml no_timer_check
212213
- name: Cache image used by default.yaml
213214
uses: ./.github/actions/setup_cache_for_template
214215
with:
@@ -353,7 +354,7 @@ jobs:
353354
steps:
354355
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
355356
with:
356-
fetch-depth: 1
357+
fetch-depth: 0
357358
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
358359
with:
359360
go-version: 1.24.x
@@ -365,7 +366,7 @@ jobs:
365366
run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu --network=lima:shared" >>$GITHUB_ENV
366367
- name: "Inject `no_timer_check` to kernel cmdline"
367368
# workaround to https://github.com/lima-vm/lima/issues/84
368-
run: ./hack/inject-cmdline-to-template.sh templates/default.yaml no_timer_check
369+
run: ./hack/inject-cmdline-to-template.sh templates/_images/ubuntu.yaml no_timer_check
369370
- name: Cache image used by default .yaml
370371
uses: ./.github/actions/setup_cache_for_template
371372
with:
@@ -408,6 +409,7 @@ jobs:
408409
steps:
409410
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
410411
with:
412+
# To avoid "failed to load YAML file \"templates/experimental/riscv64.yaml\": can't parse builtin Lima version \"3f3a6f6\": 3f3a6f6 is not in dotted-tri format"
411413
fetch-depth: 0
412414
- name: Fetch homebrew-core commit messages
413415
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -452,7 +454,7 @@ jobs:
452454
steps:
453455
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
454456
with:
455-
fetch-depth: 1
457+
fetch-depth: 0
456458
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
457459
with:
458460
go-version: 1.24.x
@@ -487,7 +489,7 @@ jobs:
487489
steps:
488490
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
489491
with:
490-
fetch-depth: 1
492+
fetch-depth: 0
491493
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
492494
with:
493495
go-version: 1.24.x

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
_output/
22
_artifacts/
33
lima.REJECTED.yaml
4+
default-template.yaml
45
schema-limayaml.json
56
.config

0 commit comments

Comments
 (0)