-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
66 lines (66 loc) · 2.88 KB
/
Copy pathaction.yml
File metadata and controls
66 lines (66 loc) · 2.88 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
name: setup-agentplane
description: Install the AgentPlane CLI in GitHub Actions.
inputs:
version:
description: AgentPlane version to install. Use a plain semver value such as 0.6.23.
required: false
default: "0.6.23"
verify:
description: Run an agentplane --version smoke check after installation.
required: false
default: "true"
runs:
using: composite
steps:
- name: Install AgentPlane
shell: bash
run: |
set -euo pipefail
version="${inputs.version}"
version="${version#v}"
tmp_dir="$(mktemp -d)"
trap 'rm -rf "$tmp_dir"' EXIT INT TERM
case "${RUNNER_OS}-${RUNNER_ARCH}" in
macOS-ARM64)
asset_url="https://github.com/basilisk-labs/agentplane/releases/download/v0.6.23/agentplane-bun-v0.6.23-darwin-arm64.tar.gz"
asset_sha256="36c39f9a334a2b64acf8230ab52a346e70cda03cb62456f9aa83c593539d0583"
;;
macOS-X64)
asset_url="https://github.com/basilisk-labs/agentplane/releases/download/v0.6.23/agentplane-bun-v0.6.23-darwin-x64.tar.gz"
asset_sha256="1fbf916faad75678d7729aea5405434ce78803d763734826f55cc98e5c4a28d2"
;;
Linux-ARM64)
asset_url="https://github.com/basilisk-labs/agentplane/releases/download/v0.6.23/agentplane-bun-v0.6.23-linux-arm64.tar.gz"
asset_sha256="bec24e56ea8d3aa5aad87f623531a27563e6716c6b86fd05198e52911a6d5789"
;;
Linux-X64)
asset_url="https://github.com/basilisk-labs/agentplane/releases/download/v0.6.23/agentplane-bun-v0.6.23-linux-x64.tar.gz"
asset_sha256="52abef3e7c75a24d20c4ea6ff70c33043738718e2be04c34cb2037a16cd959d1"
;;
Windows-X64)
asset_url="https://github.com/basilisk-labs/agentplane/releases/download/v0.6.23/agentplane-bun-v0.6.23-win32-x64.zip"
asset_sha256="11b33c7941bd26a140e4d22ca368686e573f559c5ee9e87f911626240653cc45"
;;
*)
echo "Unsupported runner: ${RUNNER_OS}-${RUNNER_ARCH}" >&2
exit 2
;;
esac
archive="${tmp_dir}/${asset_url##*/}"
install_dir="${tmp_dir}/agentplane"
mkdir -p "${install_dir}"
curl -fsSL "${asset_url}" -o "${archive}"
actual_sha256="$(shasum -a 256 "${archive}" | awk '{print $1}')"
if [ "${actual_sha256}" != "${asset_sha256}" ]; then
echo "agentplane archive checksum mismatch" >&2
exit 2
fi
if [[ "${archive}" == *.zip ]]; then
powershell -NoProfile -Command "Expand-Archive -LiteralPath '${archive}' -DestinationPath '${install_dir}' -Force"
else
tar -xzf "${archive}" -C "${install_dir}"
fi
echo "${install_dir}/bin" >> "$GITHUB_PATH"
if [ "${{ inputs.verify }}" = "true" ]; then
"${install_dir}/bin/agentplane" --version | grep -Fx "${version}"
fi