Skip to content

Commit

Permalink
build(vm-minimal): rm run-vm step
Browse files Browse the repository at this point in the history
  • Loading branch information
2moe committed Apr 6, 2024
1 parent 16885d0 commit 301c846
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/vm-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
ssh/vm.sshconf
run: |
set -fexo pipefail
apt-install ifupdown qemu-guest-agent udev fdisk
apt-install ifupdown qemu-guest-agent udev fdisk dosfstools
network_iface=${{steps.set_serial_name.outputs.network}}
tty_serial=${{steps.set_serial_name.outputs.tty}}
Expand All @@ -212,6 +212,9 @@ jobs:
apt-get clean
ls -lh /var/cache/apt
rm -vf /var/lib/apt/lists/*.* ||:
df -Th
journalctl --rotate ||:
journalctl --vacuum-time=1s ||:
- name: disk partition
id: disk_partition
Expand Down Expand Up @@ -285,37 +288,10 @@ jobs:
curl -Lo boot/EFI.fd $url
exit
}
- name: run vm & wait ssh
timeout-minutes: 15
run: |
cat run
tmux new-session -d -s run-vm
sleep 2
while {! ssh -F ssh/vm.sshconf vm exit} {
sleep 1
}
- name: clean trash in VM
uses: 2moe/local-ssh-action@v0
with:
host: vm
args: |
-F
ssh/vm.sshconf
run: |
ls -lh /var/cache/apt
df -Th
journalctl --rotate ||:
journalctl --vacuum-time=1s ||:
df -Th
dd if=/dev/zero of=/root/zero bs=1M || {
rm -vf /root/zero
}
- name: pack vm
run: |
${{env.VM_SHUTDOWN}}
loop_dev=${{steps.disk_partition.outputs.dev}}
sudo kpartx -dv $loop_dev ||:
sudo losetup --detach $loop_dev ||:
Expand Down

0 comments on commit 301c846

Please sign in to comment.