WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 46f4321

Browse files
authored
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)
1 parent b2c0f61 commit 46f4321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
sudo swapoff -a
1616
sudo rm -f /swapfile
1717
sudo apt clean
18-
docker rmi $(docker image ls -aq)
18+
docker image prune -a -f
1919
df -h
2020
- uses: actions/checkout@v3
2121
- name: Set up Python

0 commit comments

Comments
 (0)