-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
67 lines (63 loc) · 1.9 KB
/
Copy pathaction.yml
File metadata and controls
67 lines (63 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: 'LoopKit - Loop Language Validator'
description: 'Validates agent skill repositories against the Loop Language spec'
branding:
icon: 'check-circle'
color: 'blue'
inputs:
path:
description: 'Path to the project directory to validate'
required: false
default: '.'
version:
description: 'loopkit version to use ("latest" or a semver like "0.3.3")'
required: false
default: 'latest'
install-method:
description: 'npm (pre-built binary, fast) or cargo (compile from source)'
required: false
default: 'npm'
json:
description: 'Output results as JSON (recommended for CI)'
required: false
default: 'true'
verbose:
description: 'Print per-validator diagnostic counts'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Validate skill repository
shell: bash
run: |
set -euo pipefail
cli_args="${{ inputs.path }}"
if [ "${{ inputs.json }}" = "true" ]; then
cli_args="$cli_args --json"
fi
if [ "${{ inputs.verbose }}" = "true" ]; then
cli_args="$cli_args --verbose"
fi
case "${{ inputs.install-method }}" in
npm)
if [ "${{ inputs.version }}" = "latest" ]; then
npx -y loopkit-cli $cli_args
else
npx -y "loopkit-cli@${{ inputs.version }}" $cli_args
fi
;;
cargo)
echo "::group::Installing loopkit via cargo"
if [ "${{ inputs.version }}" = "latest" ]; then
cargo install loopkit
else
cargo install loopkit --version "${{ inputs.version }}"
fi
echo "::endgroup::"
loopkit $cli_args
;;
*)
echo "::error::install-method must be 'npm' or 'cargo', got '${{ inputs.install-method }}'"
exit 1
;;
esac