Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com> |
2 | # | ||||
3 | # SPDX-License-Identifier: MIT | ||||
4 | |||||
5 | name: "Cleanup dangling docker images" | ||||
6 | |||||
7 | runs: | ||||
8 | using: "composite" | ||||
9 | steps: | ||||
10 | - name: Cleanup dangling images | ||||
11 | shell: bash | ||||
12 | run: | | ||||
13 | echo -n "Cleanup dangling images... " | ||||
14 | if ! docker rmi $(docker images --filter "dangling=true" -q --no-trunc) > /dev/null 2>&1; then | ||||
15 | echo "no dangling images found." | ||||
16 | else | ||||
17 | echo "done." | ||||
18 | fi |