File tree Expand file tree Collapse file tree 4 files changed +46
-53
lines changed Expand file tree Collapse file tree 4 files changed +46
-53
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,10 @@ inputs:
1010 org :
1111 description : ' Organization name'
1212 required : true
13- github_token :
14- description : ' GitHub token'
15- required : true
1613 wait_timeout :
1714 description : ' Timeout in seconds for waiting for workloads to be ready'
1815 required : false
1916 default : ' 900'
20- cpln_token :
21- description : ' Control Plane token'
22- required : true
2317 pr_number :
2418 description : ' Pull Request number'
2519 required : true
3832 env :
3933 APP_NAME : ${{ inputs.app_name }}
4034 CPLN_ORG : ${{ inputs.org }}
41- CPLN_TOKEN : ${{ inputs.cpln_token }}
4235 WAIT_TIMEOUT : ${{ inputs.wait_timeout }}
4336 run : |
4437 # 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:
1919 issues : write
2020
2121env :
22+ PREFIX : ${{ vars.REVIEW_APP_PREFIX }}
2223 CPLN_ORG : ${{ vars.CPLN_ORG_STAGING }}
2324 CPLN_TOKEN : ${{ secrets.CPLN_TOKEN_STAGING }}
2425 APP_NAME : ${{ vars.REVIEW_APP_PREFIX }}-pr-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number }}
4344 - uses : actions/checkout@v4
4445
4546 - 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
4769
4870 - name : Setup Environment
4971 uses : ./.github/actions/setup-environment
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ concurrency:
2424 cancel-in-progress : true
2525
2626env :
27+ PREFIX : ${{ vars.REVIEW_APP_PREFIX }}
2728 APP_NAME : ${{ vars.REVIEW_APP_PREFIX }}-pr-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
2829 CPLN_TOKEN : ${{ secrets.CPLN_TOKEN_STAGING }}
2930 CPLN_ORG : ${{ vars.CPLN_ORG_STAGING }}
@@ -70,10 +71,28 @@ jobs:
7071 fetch-depth : 0
7172
7273 - 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
7796
7897 - name : Get PR HEAD Ref
7998 id : getRef
You can’t perform that action at this time.
0 commit comments