Skip to content

Commit

Permalink
ci/actions/start-vm: use inputs directly
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
  • Loading branch information
vincentkfu committed Sep 19, 2024
1 parent 3c0c091 commit bd02227
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/actions/start-vm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,20 @@ runs:
steps:
- name: Start VM in background
run: |
$QEMU \
${{ inputs.qemu }} \
-cpu host \
-drive file=$IMAGE,format=raw,if=virtio \
-drive file=${{ inputs.image }},format=raw,if=virtio \
-enable-kvm \
-smp $(nproc) \
-nographic \
-m $RAM \
-m ${{ inputs.ram }} \
-display none \
-machine q35,accel=kvm \
-nic user,model=virtio-net-pci,hostfwd=tcp::$SSH_FWD_PORT-:22 \
$OPTIONS \
-nic user,model=virtio-net-pci,hostfwd=tcp::${{ inputs.ssh_fwd_port }}-:22 \
${{ inputs.options }} \
&
shell: bash
env:
QEMU: ${{ inputs.qemu }}
IMAGE: ${{ inputs.image }}
SSH_FWD_PORT: ${{ inputs.ssh_fwd_port }}
RAM: ${{ inputs.ram }}
OPTIONS: ${{ inputs.options }}
SSHCMD: ssh root@localhost -p ${{ inputs.ssh_fwd_port }}
- name: Wait for VM to boot
run: sleep 10
Expand Down

0 comments on commit bd02227

Please sign in to comment.