perf: skip apt-get if tools already installed

This commit is contained in:
ivanberry 2026-03-12 22:05:26 +08:00
parent f9a9b81ff7
commit 3b65de7154
1 changed files with 10 additions and 2 deletions

View File

@ -23,8 +23,16 @@ runs:
shell: bash
run: |
set -e
apt-get update -qq
apt-get install -y -qq jq curl ca-certificates python3
MISSING=""
command -v jq >/dev/null 2>&1 || MISSING="$MISSING jq"
command -v curl >/dev/null 2>&1 || MISSING="$MISSING curl"
command -v python3 >/dev/null 2>&1 || MISSING="$MISSING python3"
if [ -n "$MISSING" ]; then
apt-get update -qq
apt-get install -y -qq $MISSING ca-certificates
else
echo "All dependencies already available, skipping install"
fi
- name: Load skill doc
shell: bash