mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 12:59:03 +02:00
ci: Define an action for cleaning dangling image
Cleanup existing dangling docker images on the runner. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
This commit is contained in:
parent
8b1ab71006
commit
2906a95cff
18
.github/actions/docker-clean-dangling/action.yml
vendored
Normal file
18
.github/actions/docker-clean-dangling/action.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: "Cleanup dangling docker images"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Cleanup dangling images
|
||||
shell: bash
|
||||
run: |
|
||||
echo -n "Cleanup dangling images... "
|
||||
if ! docker rmi $(docker images --filter "dangling=true" -q --no-trunc) > /dev/null 2>&1; then
|
||||
echo "no dangling images found."
|
||||
else
|
||||
echo "done."
|
||||
fi
|
Loading…
Reference in New Issue
Block a user