♻️ 隔离 workflow 工作区并提升默认 runner 并发
This commit is contained in:
@@ -161,7 +161,7 @@ try:
|
||||
|
||||
# 使用实际注册的 labels
|
||||
config['runner']['labels'] = registered_labels
|
||||
config['runner']['capacity'] = 2
|
||||
config['runner']['capacity'] = 4
|
||||
|
||||
# 启用缓存
|
||||
if 'cache' not in config:
|
||||
@@ -175,7 +175,7 @@ try:
|
||||
|
||||
print("✓ Configuration updated using Python")
|
||||
print(f" - Labels: {registered_labels}")
|
||||
print(f" - Capacity: 2")
|
||||
print(f" - Capacity: 4")
|
||||
print(f" - Cache enabled: ./cache")
|
||||
sys.exit(0)
|
||||
|
||||
@@ -191,7 +191,7 @@ PYEOF
|
||||
echo "⚠ Python configuration failed, using basic sed..."
|
||||
|
||||
# 基本的 sed 修改(只修改简单的值,不动 labels)
|
||||
sed -i 's/capacity: 1/capacity: 2/g' config.yaml || true
|
||||
sed -i 's/capacity: 1/capacity: 4/g' config.yaml || true
|
||||
sed -i 's/enabled: false/enabled: true/g' config.yaml || true
|
||||
sed -i 's|dir: ""|dir: ./cache|g' config.yaml || true
|
||||
|
||||
@@ -202,7 +202,7 @@ else
|
||||
echo "⚠ Python3 not found, applying basic configuration..."
|
||||
|
||||
# 基本的 sed 修改
|
||||
sed -i 's/capacity: 1/capacity: 2/g' config.yaml || true
|
||||
sed -i 's/capacity: 1/capacity: 4/g' config.yaml || true
|
||||
sed -i 's/enabled: false/enabled: true/g' config.yaml || true
|
||||
sed -i 's|dir: ""|dir: ./cache|g' config.yaml || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user