Skip to content

Commit e91c443

Browse files
committed
try env.containerid
Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com>
1 parent b27979c commit e91c443

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
name: Container Cleanup
2-
description: Remove container and clean up image caches.
2+
description: Remove container via container ID and clean up image caches.
3+
4+
inputs:
5+
container_id:
6+
description: Container ID to be removed
7+
required: true
38

49
runs:
510
using: composite
611
steps:
712
- name: Cleanup container and images
813
shell: bash
914
run: |
10-
docker rm -f ${CONTAINER_ID} || true
15+
docker rm -f ${{ container_id }} || true
1116
docker image prune -a --force --filter "until=24h"
1217
docker system df

.github/workflows/pr-sglang.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,12 @@ jobs:
139139
- name: Cleanup container and images
140140
if: always()
141141
uses: ./.github/actions/container-cleanup
142+
with:
143+
container_id: ${{ env.CONTAINER_ID }}
144+
145+
- name: Cleanup container and images failsafe
146+
if: always()
147+
run: |
148+
docker rm -f ${CONTAINER_ID} || true
149+
docker image prune -a --force --filter "until=24h"
150+
docker system df

.pre-commit-config.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ repos:
1616
rev: v6.0.0
1717
hooks:
1818
# ------------------------------- 🌳 Git Tools ------------------------------- #
19-
- id: check-merge-conflict
20-
name: "🌳 git · Detect conflict markers"
21-
- id: forbid-new-submodules
22-
name: "🌳 git · Prevent submodule creation"
23-
- id: no-commit-to-branch
24-
name: "🌳 git · Protect main branches"
25-
args: ["--branch", "main", "--branch", "master"]
19+
- id: check-merge-conflict
20+
name: "🌳 git · Detect conflict markers"
21+
- id: forbid-new-submodules
22+
name: "🌳 git · Prevent submodule creation"
23+
- id: no-commit-to-branch
24+
name: "🌳 git · Protect main branches"
25+
args: ["--branch", "main", "--branch", "master"]
2626
# ---------------------------- 📁 Filesystem Tools --------------------------- #
2727
- id: check-executables-have-shebangs
2828
name: "📁 filesystem/⚙️ exec · Verify shebang presence"
@@ -37,16 +37,16 @@ repos:
3737
- id: trailing-whitespace
3838
name: "📁 filesystem/📝 file · Validate empty whitespaces"
3939
# ----------------------------- 🔒 Security Tools ---------------------------- #
40-
- id: check-json
41-
name: "📁 filesystem/🔧 config · Validate JSON file"
42-
- id: check-yaml
43-
name: "📁 filesystem/🔧 config · Validate YAML file"
44-
- id: detect-aws-credentials
45-
name: "🔒 security · Detect aws credentials"
46-
args:
47-
- --allow-missing-credentials
48-
- id: detect-private-key
49-
name: "🔒 security · Detect private keys"
40+
- id: check-json
41+
name: "📁 filesystem/🔧 config · Validate JSON file"
42+
- id: check-yaml
43+
name: "📁 filesystem/🔧 config · Validate YAML file"
44+
- id: detect-aws-credentials
45+
name: "🔒 security · Detect aws credentials"
46+
args:
47+
- --allow-missing-credentials
48+
- id: detect-private-key
49+
name: "🔒 security · Detect private keys"
5050

5151

5252
- repo: https://github.com/gitleaks/gitleaks

0 commit comments

Comments
 (0)