Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/actions/validate-required-vars/action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
name: 'Validate Required Variables'
description: 'Validates that all required secrets and variables for Control Plane operations'

inputs:
org:
description: 'Organization name'
required: true
prefix:
description: 'Review App Prefix'
required: true

runs:
using: 'composite'
steps:
- name: Validate Required Secrets and Variables
shell: bash
env:
REVIEW_APP_PREFIX: ${{ inputs.prefix }}
CPLN_ORG_STAGING: ${{ inputs.org }}
CPLN_TOKEN_STAGING: ${{ secrets.CPLN_TOKEN_STAGING }}
run: |
missing=()

Expand All @@ -18,6 +30,7 @@ runs:
if [ -z "$CPLN_ORG_STAGING" ]; then
missing+=("Variable: CPLN_ORG_STAGING")
fi

if [ -z "$REVIEW_APP_PREFIX" ]; then
missing+=("Variable: REVIEW_APP_PREFIX")
fi
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-to-control-plane-review-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ jobs:

- name: Validate Required Secrets and Variables
uses: ./.github/actions/validate-required-vars
with:
prefix: ${{ vars.REVIEW_APP_PREFIX }}
org: ${{ vars.CPLN_ORG_STAGING }}

- name: Get PR HEAD Ref
id: getRef
Expand Down
Loading