Skip to content

Commit

Permalink
rework-main-job-deploy-experimental-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Jan 27, 2025
1 parent fafac82 commit af6bfc9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 2 additions & 10 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
name: 'Setup Environment'
description: 'Sets up Ruby, installs Control Plane CLI, cpflow gem, and sets up the default profile'

inputs:
cpln_token:
description: 'Control Plane token'
required: true
cpln_org:
description: 'Control Plane organization'
required: true

runs:
using: 'composite'
steps:
Expand All @@ -30,8 +22,8 @@ runs:
- name: Setup Control Plane Profile
shell: bash
env:
CPLN_TOKEN: ${{ inputs.cpln_token }}
CPLN_ORG: ${{ inputs.cpln_org }}
CPLN_TOKEN: ${{ env.CPLN_TOKEN }}
CPLN_ORG: ${{ env.CPLN_ORG }}
run: |
if [ -z "$CPLN_TOKEN" ]; then
echo " Error: CPLN_TOKEN environment variable is not set"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-to-control-plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
cpln_token: ${{ secrets.CPLN_TOKEN_STAGING }}
cpln_org: ${{ env.CPLN_ORG }}
env:
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
CPLN_ORG: ${{ vars.CPLN_ORG_STAGING }}

- name: Deploy to Control Plane
id: deploy
Expand Down Expand Up @@ -97,9 +97,9 @@ jobs:
- name: Setup Environment
uses: ./.github/actions/setup-environment
with:
cpln_token: ${{ secrets.CPLN_TOKEN_STAGING }}
cpln_org: ${{ env.CPLN_ORG }}
env:
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
CPLN_ORG: ${{ vars.CPLN_ORG_STAGING }}

- name: Get PR Number for Push Event
if: github.event_name == 'push'
Expand Down

0 comments on commit af6bfc9

Please sign in to comment.