ci: Define an action for cleaning/removing an image

This is useful when cleaning up after a temporary built docker image.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
This commit is contained in:
Andrei Gherzan 2022-02-11 16:22:18 +01:00 committed by Andrei Gherzan
parent 2906a95cff
commit 3786353f51

View File

@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com>
#
# SPDX-License-Identifier: MIT
name: "Cleanup docker storage"
inputs:
docker_image:
required: true
description: "The name of the docker image"
runs:
using: "composite"
steps:
- name: Cleanup temporary image
shell: bash
run: |
echo "Cleanup ${{ inputs.docker_image }} image..."
docker rmi "${{ inputs.docker_image }}" || true