We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990ddc1 commit 3367c07Copy full SHA for 3367c07
.github/workflows/fatimage.yml
@@ -93,6 +93,17 @@ jobs:
93
echo "image-name=${IMAGE_NAME}" >> "$GITHUB_OUTPUT"
94
echo "image-id=$IMAGE_ID" >> "$GITHUB_OUTPUT"
95
96
+ - name: Delete old latest image
97
+ run: |
98
+ . venv/bin/activate
99
+ IMAGE_COUNT=${openstack image list --name ${{ steps.manifest.outputs.image-name }} -f value -c ID | wc -l}
100
+ if [ "$IMAGE_COUNT" -gt 1 ]; then
101
+ OLD_IMAGE_ID=$(openstack image list --sort created_at:asc --name "${{ steps.manifest.outputs.image-name }}" -f value -c ID | head -n 1)
102
+ openstack image delete "$OLD_IMAGE_ID"
103
+ else
104
+ echo "Only one image exists, skipping deletion."
105
+ fi
106
+
107
- name: Download image
108
run: |
109
. venv/bin/activate
0 commit comments