File tree 4 files changed +46
-53
lines changed
4 files changed +46
-53
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,10 @@ inputs:
10
10
org :
11
11
description : ' Organization name'
12
12
required : true
13
- github_token :
14
- description : ' GitHub token'
15
- required : true
16
13
wait_timeout :
17
14
description : ' Timeout in seconds for waiting for workloads to be ready'
18
15
required : false
19
16
default : ' 900'
20
- cpln_token :
21
- description : ' Control Plane token'
22
- required : true
23
17
pr_number :
24
18
description : ' Pull Request number'
25
19
required : true
38
32
env :
39
33
APP_NAME : ${{ inputs.app_name }}
40
34
CPLN_ORG : ${{ inputs.org }}
41
- CPLN_TOKEN : ${{ inputs.cpln_token }}
42
35
WAIT_TIMEOUT : ${{ inputs.wait_timeout }}
43
36
run : |
44
37
# Run the deployment script
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ permissions:
19
19
issues : write
20
20
21
21
env :
22
+ PREFIX : ${{ vars.REVIEW_APP_PREFIX }}
22
23
CPLN_ORG : ${{ vars.CPLN_ORG_STAGING }}
23
24
CPLN_TOKEN : ${{ secrets.CPLN_TOKEN_STAGING }}
24
25
APP_NAME : ${{ vars.REVIEW_APP_PREFIX }}-pr-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number }}
43
44
- uses : actions/checkout@v4
44
45
45
46
- name : Validate Required Secrets and Variables
46
- uses : ./.github/actions/validate-required-vars
47
+ shell : bash
48
+ run : |
49
+ missing=()
50
+
51
+ # Check required secrets
52
+ if [ -z "$CPLN_TOKEN" ]; then
53
+ missing+=("Secret: CPLN_TOKEN_STAGING")
54
+ fi
55
+
56
+ # Check required variables
57
+ if [ -z "$CPLN_ORG" ]; then
58
+ missing+=("Variable: CPLN_ORG_STAGING")
59
+ fi
60
+
61
+ if [ -z "$"PREFIX" }} ]; then
62
+ missing+=("Variable: REVIEW_APP_PREFIX")
63
+ fi
64
+
65
+ if [ ${#missing[@]} -ne 0 ]; then
66
+ echo "Required secrets/variables are not set: ${missing[*]}"
67
+ exit 1
68
+ fi
47
69
48
70
- name : Setup Environment
49
71
uses : ./.github/actions/setup-environment
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ concurrency:
24
24
cancel-in-progress : true
25
25
26
26
env :
27
+ PREFIX : ${{ vars.REVIEW_APP_PREFIX }}
27
28
APP_NAME : ${{ vars.REVIEW_APP_PREFIX }}-pr-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
28
29
CPLN_TOKEN : ${{ secrets.CPLN_TOKEN_STAGING }}
29
30
CPLN_ORG : ${{ vars.CPLN_ORG_STAGING }}
@@ -70,10 +71,28 @@ jobs:
70
71
fetch-depth : 0
71
72
72
73
- name : Validate Required Secrets and Variables
73
- uses : ./.github/actions/validate-required-vars
74
- with :
75
- prefix : ${{ vars.REVIEW_APP_PREFIX }}
76
- org : ${{ vars.CPLN_ORG_STAGING }}
74
+ shell : bash
75
+ run : |
76
+ missing=()
77
+
78
+ # Check required secrets
79
+ if [ -z "$CPLN_TOKEN" ]; then
80
+ missing+=("Secret: CPLN_TOKEN_STAGING")
81
+ fi
82
+
83
+ # Check required variables
84
+ if [ -z "$CPLN_ORG" ]; then
85
+ missing+=("Variable: CPLN_ORG_STAGING")
86
+ fi
87
+
88
+ if [ -z "$"PREFIX" }} ]; then
89
+ missing+=("Variable: REVIEW_APP_PREFIX")
90
+ fi
91
+
92
+ if [ ${#missing[@]} -ne 0 ]; then
93
+ echo "Required secrets/variables are not set: ${missing[*]}"
94
+ exit 1
95
+ fi
77
96
78
97
- name : Get PR HEAD Ref
79
98
id : getRef
You can’t perform that action at this time.
0 commit comments