Skip to content

Commit 17ec447

Browse files
committed
composition job
1 parent 297c4db commit 17ec447

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

action.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ inputs:
1313
description: "GitHub repository containing the binary (format: owner/repo)"
1414
required: true
1515
default: "ctrlplanedev/ctrlc"
16+
url:
17+
description: "URL of the ctrlplane instance"
18+
required: false
19+
api_key:
20+
description: "API key for the ctrlplane instance"
21+
required: false
22+
1623
runs:
1724
using: "composite"
1825
steps:
@@ -28,9 +35,21 @@ runs:
2835
fi
2936
3037
BINARY_NAME="${{ inputs.binary }}_${OS}_${ARCH}"
31-
DOWNLOAD_URL="https://github.com/${{ inputs.repo }}/releases/download/${{ inputs.version }}/cli_${BINARY_NAME}.tar.gz"
38+
DOWNLOAD_URL="https://github.com/${{ inputs.repo }}/releases/download/${{ inputs.version }}/ctrlc_${BINARY_NAME}.tar.gz"
3239
3340
curl -L $DOWNLOAD_URL -o binary.tar.gz
3441
tar xzf binary.tar.gz
3542
chmod +x ${{ inputs.binary }}
3643
sudo mv ${{ inputs.binary }} /usr/local/bin/
44+
45+
- name: Set Ctrlplane URL
46+
shell: bash
47+
if: inputs.url != ''
48+
run: |
49+
ctrlc config set url ${{ inputs.url }}
50+
51+
- name: Set Ctrlplane API Key
52+
shell: bash
53+
if: inputs.api_key != ''
54+
run: |
55+
ctrlc config set api-key ${{ inputs.api_key }}

0 commit comments

Comments
 (0)