Skip to content

Commit 0888a36

Browse files
committed
ci: fix image name
1 parent 33c795a commit 0888a36

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

.github/workflows/test-board.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,16 @@ jobs:
4545
- name: Download images and patch VM configs
4646
run: |
4747
echo "Downloading guest images and patching VM config files..."
48-
mkdir -p /tmp/images
4948
IFS=',' read -ra CONFIGS <<< "${{ matrix.vmconfigs }}"
5049
IFS=',' read -ra IMAGES <<< "${{ matrix.vmimage_name }}"
5150
for i in "${!CONFIGS[@]}"; do
5251
img="${IMAGES[$i]}"
5352
img=$(echo "$img" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
5453
config="${CONFIGS[$i]}"
5554
config=$(echo "$config" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
56-
img_name="${img%.tar.gz}"
57-
58-
echo "Downloading $img and patching $config..."
59-
wget -P /tmp/images https://github.com/arceos-hypervisor/axvisor-guest/releases/latest/download/$img
60-
tar -xzf /tmp/images/$img -C /tmp/images
61-
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/images/'"$img_name"'"|' "$config"
55+
cargo xtask image download $img
56+
img_name="${{ matrix.board }}"
57+
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img_name"'"|' "$config"
6258
echo "Updated kernel_path in $config"
6359
done
6460

.github/workflows/test-qemu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
img=$(echo "$img" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
4444
config="${CONFIGS[$i]}"
4545
config=$(echo "$config" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
46-
cargo xtask image rm $img
4746
cargo xtask image download $img
48-
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img"'"|' "$config"
47+
img_name="qemu-${{ matrix.board }}"
48+
sed -i 's|^kernel_path[[:space:]]*=.*|kernel_path = "/tmp/axvisor/'"$img"'/'"$img_name"'"|' "$config"
4949
echo "Updated kernel_path in $config"
5050
done
5151

0 commit comments

Comments
 (0)