-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (43 loc) · 1.55 KB
/
Copy pathaction.yml
File metadata and controls
51 lines (43 loc) · 1.55 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
name: "Install Tracer Client"
author: "Vaibhav Upreti"
description: "GitHub Action to install the Tracer CLI client for your workflows."
branding:
color: "blue"
icon: "activity"
inputs:
tracer_user_id:
description: "Tracer User ID (optional, for personalized setup)"
required: false
cli_branch:
description: "Install Tracer from a custom CLI branch (must be a PR branch)"
required: false
default: "main"
installer_branch:
description: "Use installer from a custom branch (must be a PR branch)"
required: false
default: "main"
runs:
using: "composite"
steps:
- name: "Install Tracer Client"
shell: bash
run: |
set -euo pipefail
if [ -n "${{ inputs.tracer_user_id }}" ]; then
export TRACER_USER_ID="${{ inputs.tracer_user_id }}"
echo "Using TRACER_USER_ID: $TRACER_USER_ID"
fi
CLI_BRANCH_ARG="CLI_BRANCH=\"${{ inputs.cli_branch }}\""
INS_BRANCH_ARG="INS_BRANCH=\"${{ inputs.installer_branch }}\""
echo "Using CLI branch: ${{ inputs.cli_branch }}"
echo "Using installer branch: ${{ inputs.installer_branch }}"
eval "curl -sSL https://install.tracer.cloud | $CLI_BRANCH_ARG $INS_BRANCH_ARG sh"
export PATH="$HOME/.tracer/bin:$HOME/.local/bin:$PATH"
# Verify installation
if command -v tracer >/dev/null 2>&1; then
VERSION=$(tracer --version)
echo "Tracer installed successfully: $VERSION"
else
echo "Tracer installation failed or not in PATH"
exit 1
fi