Skip to content

Commit 9b9398f

Browse files
committed
convert image to qcow2 during sync workflow
1 parent df91dda commit 9b9398f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/s3-image-sync.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626

2727
- name: Install s3cmd
2828
run: |
29+
sudo apt-get update
2930
sudo apt-get --yes install s3cmd
3031
3132
- name: Cleanup S3 bucket
@@ -75,9 +76,10 @@ jobs:
7576
echo "${{ secrets['ARCUS_S3_CFG'] }}" > ~/.s3cfg
7677
shell: bash
7778

78-
- name: Install s3cmd
79+
- name: Install s3cmd and qemu-utils
7980
run: |
80-
sudo apt-get --yes install s3cmd
81+
sudo apt-get update
82+
sudo apt-get --yes install s3cmd qemu-utils
8183
8284
- name: Retrieve image name
8385
run: |
@@ -88,7 +90,13 @@ jobs:
8890
- name: Download image to runner
8991
run: |
9092
. venv/bin/activate
91-
openstack image save --file ${{ env.TARGET_IMAGE }} ${{ env.TARGET_IMAGE }}
93+
openstack image save --file "${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
94+
shell: bash
95+
96+
- name: Convert image to QCOW2
97+
run: |
98+
. venv/bin/activate
99+
qemu-img convert -f raw -O qcow2 "${{ env.TARGET_IMAGE }}.raw" "${{ env.TARGET_IMAGE }}"
92100
shell: bash
93101

94102
- name: Upload Image to S3

0 commit comments

Comments
 (0)