Skip to content

Commit

Permalink
promote
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Jan 29, 2025
1 parent 586dac3 commit eeabd9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/help-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,3 @@ jobs:
issue_number: prNumber,
body: helpText
});
16 changes: 9 additions & 7 deletions .github/workflows/promote-staging-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@ jobs:
if: github.event.inputs.confirm_promotion == 'promote'

env:
APP_NAME: react-webpack-rails-tutorial
CPLN_ORG: ${{ secrets.CPLN_ORG }}
UPSTREAM_TOKEN: ${{ secrets.STAGING_TOKEN }}
APP_NAME: ${{ vars.PRODUCTION_APP_NAME }}
CPLN_ORG: ${{ secrets.CPLN_ORG_PRODUCTION }}
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_PRODUCTION }}
UPSTREAM_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Environment
uses: ./.github/actions/setup-environment
env:
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN }}

with:
token: ${{ secrets.CPLN_TOKEN_PRODUCTION }}
org: ${{ vars.CPLN_ORG_PRODUCTION }}

- name: Promote Staging to Production
id: promote
run: |
echo "🚀 Starting promotion from staging to production..."
echo "🚀 Starting promotion from staging to production... for app ${APP_NAME}"
if ! cpflow promote-app-from-upstream -a "${APP_NAME}" -t "${UPSTREAM_TOKEN}" --org "${CPLN_ORG}"; then
echo "❌ Failed to promote staging to production"
Expand Down

0 comments on commit eeabd9c

Please sign in to comment.