-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathaction.yml
More file actions
40 lines (33 loc) · 1.13 KB
/
action.yml
File metadata and controls
40 lines (33 loc) · 1.13 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
# Control Plane GitHub Action
name: 'Setup Environment'
description: 'Sets up Ruby, installs Control Plane CLI, cpflow gem, and sets up the default profile'
runs:
using: 'composite'
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4'
- name: Install Control Plane CLI and cpflow gem
shell: bash
run: |
sudo npm install -g @controlplane/cli@3.3.0
cpln --version
gem install cpflow -v 4.1.0
cpflow --version
- name: Setup Control Plane Profile
shell: bash
run: |
if [ -z "$CPLN_TOKEN" ]; then
echo " Error: CPLN_TOKEN environment variable is not set"
exit 1
fi
if [ -z "$CPLN_ORG" ]; then
echo " Error: CPLN_ORG environment variable is not set"
exit 1
fi
echo "Setting up Control Plane profile..."
echo "Organization: $CPLN_ORG"
cpln profile update default --org "$CPLN_ORG" --token "$CPLN_TOKEN"
echo "Setting up Docker login for Control Plane registry..."
cpln image docker-login --org "$CPLN_ORG"