Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Jan 28, 2025
1 parent c084dc4 commit 45b512c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
11 changes: 10 additions & 1 deletion .github/actions/deploy-to-control-plane/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ inputs:
description: 'Timeout in seconds for waiting for workloads to be ready'
required: false
default: '900'
cpln_token:
description: 'Control Plane token'
required: true
pr_number:
description: 'Pull Request number'
required: true

outputs:
review_app_url:
Expand Down Expand Up @@ -50,11 +56,14 @@ runs:
run: ${{ github.action_path }}/scripts/get-commit-sha.sh
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
PR_NUMBER: ${{ env.PR_NUMBER }}
PR_NUMBER: ${{ inputs.pr_number }}

- name: Deploy to Control Plane
id: deploy
shell: bash
env:
CPLN_TOKEN: ${{ inputs.cpln_token }}
PR_NUMBER: ${{ inputs.pr_number }}
run: |
echo "🚀 Deploying app for PR #${PR_NUMBER}..."
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/deploy-to-control-plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ jobs:

- name: Check if Review App Exists
id: check-app
if: github.event_name == 'push'
env:
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN }}
run: |
if ! cpflow exists -a ${{ env.APP_NAME }}; then
echo "No review app exists for this PR"
Expand Down Expand Up @@ -283,9 +280,8 @@ jobs:
org: ${{ env.CPLN_ORG }}
github_token: ${{ secrets.GITHUB_TOKEN }}
wait_timeout: ${{ vars.WAIT_TIMEOUT || 900 }}
env:
CPLN_TOKEN: ${{ env.CPLN_TOKEN }}
PR_NUMBER: ${{ env.PR_NUMBER }}
cpln_token: ${{ secrets.CPLN_TOKEN_STAGING }}
pr_number: ${{ env.PR_NUMBER }}

- name: Update Status - Deployment Complete
uses: actions/github-script@v7
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Checkout
uses: actions/checkout

- name: Show Help Information
uses: shakacode/shared-actions/help-command@justin808-more-work-on-review-apps-2
- name: Process Help Command
uses: shakacode/react-webpack-rails-tutorial/.github/actions/help-command@justin808-more-work-on-review-apps-2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.inputs.issue-number }}
issue-number: ${{ github.event.inputs.issue-number }}

0 comments on commit 45b512c

Please sign in to comment.