Swapped order of mkinitfs and kernel installation #139
This file contains 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: CI | |
on: | |
- pull_request | |
- push | |
jobs: | |
test-ubuntu: | |
name: Test on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install qemu-utils | |
run: | | |
sudo apt-get update | |
sudo apt-get install qemu-utils | |
- uses: actions/checkout@v3 | |
- name: Build image for x86_64 with BIOS mode and without GPT | |
run: | | |
sudo ./alpine-make-vm-image \ | |
--image-format qcow2 \ | |
--image-size 2G \ | |
--repositories-file example/repositories \ | |
--packages "$(cat example/packages)" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-bios-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh | |
- name: Build image for x86_64 with BIOS mode and GPT | |
run: | | |
sudo ./alpine-make-vm-image \ | |
--image-format raw \ | |
--image-size 2G \ | |
--partition \ | |
--repositories-file example/repositories \ | |
--packages "$(cat example/packages)" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-bios-part-$(date +%Y-%m-%d).raw -- ./example/configure.sh | |
- name: Build image for x86_64 with UEFI mode | |
run: | | |
sudo ./alpine-make-vm-image \ | |
--image-format qcow2 \ | |
--image-size 2G \ | |
--boot-mode UEFI \ | |
--repositories-file example/repositories \ | |
--packages "$(cat example/packages)" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-uefi-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh | |
- name: Install qemu-aarch64 and register in binfmt | |
uses: jirutka/setup-alpine@v1 | |
with: | |
arch: aarch64 | |
- name: Build image for aarch64 | |
run: | | |
sudo ./alpine-make-vm-image \ | |
--arch aarch64 \ | |
--image-format qcow2 \ | |
--image-size 2G \ | |
--repositories-file example/repositories \ | |
--packages "$(cat example/packages) linux-virt@edge" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-aarch64-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh | |
test-alpine: | |
name: Test on Alpine | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# We must run this outside the chroot. | |
- run: sudo modprobe nbd max_part=16 | |
- name: Set up latest Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
- name: Build image for x86_64 with BIOS mode and without GPT | |
run: | | |
./alpine-make-vm-image \ | |
--image-format qcow2 \ | |
--image-size 2G \ | |
--repositories-file example/repositories \ | |
--packages "$(cat example/packages)" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-bios-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh | |
shell: alpine.sh --root {0} | |
- name: Build image for x86_64 with UEFI mode | |
run: | | |
./alpine-make-vm-image \ | |
--image-format qcow2 \ | |
--image-size 2G \ | |
--boot-mode UEFI \ | |
--repositories-file example/repositories \ | |
--packages "$(cat example/packages)" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-uefi-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh | |
shell: alpine.sh --root {0} | |
- name: Install qemu-aarch64 and register in binfmt | |
uses: jirutka/setup-alpine@v1 | |
with: | |
arch: aarch64 | |
shell-name: alpine-aarch64.sh | |
# Note: We cannot run alpine-make-vm-image inside emulated chroot due to nbd. | |
- name: Build image for aarch64 | |
run: | | |
./alpine-make-vm-image \ | |
--arch aarch64 \ | |
--branch edge \ | |
--image-format qcow2 \ | |
--image-size 2G \ | |
--packages "$(cat example/packages)" \ | |
--fs-skel-dir example/rootfs \ | |
--fs-skel-chown root:root \ | |
--script-chroot \ | |
alpine-aarch64-$(date +%Y-%m-%d).qcow2 -- ./example/configure.sh | |
shell: alpine.sh --root {0} |