Skip to content

Commit 71bf8ae

Browse files
committed
use container cleanup action
Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com>
1 parent d04fb8a commit 71bf8ae

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Container Cleanup
2+
description: Remove container and clean up image caches.
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Cleanup container and images
8+
shell: bash
9+
run: |
10+
run: |
11+
docker rm -f ${CONTAINER_ID} || true
12+
docker image prune -a --force --filter "until=24h"
13+
docker system df

.github/workflows/pr-sglang.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ jobs:
118118
-e HF_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }} \
119119
${IMAGE_URI})
120120
echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV
121-
echo "Printing container startup logs ..."
122121
sleep 300s
123-
docker logs --tail 200 ${CONTAINER_ID}
122+
echo "Printing container startup logs ..."
123+
docker logs ${CONTAINER_ID}
124124
125125
- name: Setup for SGLang tests
126126
run: |
@@ -145,7 +145,4 @@ jobs:
145145
146146
- name: Cleanup container and images
147147
if: always()
148-
run: |
149-
docker rm -f ${CONTAINER_ID} || true
150-
docker image prune -a --force --filter "until=24h"
151-
docker system df
148+
uses: ./.github/actions/container-cleanup

0 commit comments

Comments
 (0)