File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,13 @@ builds:
2626 tags :
2727 - containers_image_openpgp
2828 main : ./cmd/ctrlc
29+ binary : ctrlc
2930
3031archives :
3132 - format : tar.gz
3233 # this name template makes the OS and Arch compatible with the results of `uname`.
3334 name_template : >-
34- {{ .ProjectName }}_
35+ ctrlc_
3536 {{- title .Os }}_
3637 {{- if eq .Arch "amd64" }}x86_64
3738 {{- else if eq .Arch "386" }}i386
Original file line number Diff line number Diff line change 1+ # CtrlC CLI
2+
3+ This is a CLI for CtrlPlane.
Original file line number Diff line number Diff line change 1+ name : Install Go Binary
2+ description : Installs a Go binary from a GitHub repository
3+
4+ inputs :
5+ binary :
6+ description : " Name of the binary to install"
7+ required : true
8+ default : " ctrlc"
9+ version :
10+ description : " Version of the binary to install"
11+ required : true
12+ repo :
13+ description : " GitHub repository containing the binary (format: owner/repo)"
14+ required : true
15+ default : " ctrlplanedev/ctrlc"
16+ runs :
17+ using : " composite"
18+ steps :
19+ - name : Download binary
20+ shell : bash
21+ run : |
22+ OS=$(uname -s | tr '[:upper:]' '[:lower:]')
23+ ARCH=$(uname -m)
24+ if [ "$ARCH" = "x86_64" ]; then
25+ ARCH="x86_64"
26+ elif [ "$ARCH" = "aarch64" ]; then
27+ ARCH="arm64"
28+ fi
29+
30+ BINARY_NAME="${{ inputs.binary }}_${OS}_${ARCH}"
31+ DOWNLOAD_URL="https://github.com/${{ inputs.repo }}/releases/download/${{ inputs.version }}/cli_${BINARY_NAME}.tar.gz"
32+
33+ curl -L $DOWNLOAD_URL -o binary.tar.gz
34+ tar xzf binary.tar.gz
35+ chmod +x ${{ inputs.binary }}
36+ sudo mv ${{ inputs.binary }} /usr/local/bin/
You can’t perform that action at this time.
0 commit comments