Skip to content

Commit 0b23cba

Browse files
add manually clean up container action (#1296)
Signed-off-by: chensuyue <suyue.chen@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 50dd959 commit 0b23cba

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (C) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Clean up container on manual event
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
node:
9+
default: "rocm"
10+
description: "Hardware to clean"
11+
required: true
12+
type: string
13+
clean_list:
14+
default: ""
15+
description: "docker command to clean"
16+
required: true
17+
type: string
18+
19+
jobs:
20+
clean:
21+
runs-on: "${{ inputs.node }}"
22+
steps:
23+
- name: Clean up container
24+
run: |
25+
docker ps
26+
if [ "${{ inputs.clean_list }}" ]; then
27+
docker stop ${{ inputs.clean_list }} && docker rm ${{ inputs.clean_list }}
28+
docker ps
29+
fi

0 commit comments

Comments
 (0)