Skip to content

Commit 8f7c638

Browse files
committed
initial attempt
1 parent 586dac3 commit 8f7c638

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/actions/validate-required-vars/action.yml

+13
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
name: 'Validate Required Variables'
22
description: 'Validates that all required secrets and variables for Control Plane operations'
33

4+
inputs:
5+
org:
6+
description: 'Organization name'
7+
required: true
8+
prefix:
9+
description: 'Review App Prefix'
10+
required: true
11+
412
runs:
513
using: 'composite'
614
steps:
715
- name: Validate Required Secrets and Variables
816
shell: bash
17+
env:
18+
REVIEW_APP_PREFIX: ${{ inputs.prefix }}
19+
CPLN_ORG_STAGING: ${{ inputs.org }}
20+
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}
921
run: |
1022
missing=()
1123
@@ -18,6 +30,7 @@ runs:
1830
if [ -z "$CPLN_ORG_STAGING" ]; then
1931
missing+=("Variable: CPLN_ORG_STAGING")
2032
fi
33+
2134
if [ -z "$REVIEW_APP_PREFIX" ]; then
2235
missing+=("Variable: REVIEW_APP_PREFIX")
2336
fi

.github/workflows/deploy-to-control-plane-review-app.yml

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ jobs:
7171

7272
- name: Validate Required Secrets and Variables
7373
uses: ./.github/actions/validate-required-vars
74+
with:
75+
prefix: ${{ vars.REVIEW_APP_PREFIX }}
76+
org: ${{ vars.CPLN_ORG_STAGING }}
7477

7578
- name: Get PR HEAD Ref
7679
id: getRef

0 commit comments

Comments
 (0)