Update main.yml to correct docker rmi command

This replaces the failing `docker rmi $(docker image ls -aq)` command with the more flexible and versatile `docker image prune -a -f` command.

The `docker image prune -a -f` command will prune images from previous runs if they are present, and will do nothing if there are no old images present.   This accomplishes the same thing that the ` docker rmi $(docker image ls -aq)` was trying to accomplish (but was failing when there were no previous/old images to find/delete)
This commit is contained in:
Tim Maffett
2025-08-08 07:11:04 -07:00
committed by GitHub
parent b2c0f61d8a
commit 46f4321ef8

View File

@@ -15,7 +15,7 @@ jobs:
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
docker image prune -a -f
df -h
- uses: actions/checkout@v3
- name: Set up Python