File tree Expand file tree Collapse file tree 2 files changed +9
-19
lines changed Expand file tree Collapse file tree 2 files changed +9
-19
lines changed Original file line number Diff line number Diff line change 4646 allow_app_override_by_env : false
4747
4848 # Use a different organization for production.
49- cpln_org : shakacode-open-source-examples
49+ cpln_org : shakacode-open-source-examples-production
5050
5151 upstream : react-webpack-rails-tutorial-staging
5252
Original file line number Diff line number Diff line change @@ -13,31 +13,21 @@ jobs:
1313 runs-on : ubuntu-latest
1414 if : github.event.inputs.confirm_promotion == 'promote'
1515
16- env :
17- APP_NAME : react-webpack-rails-tutorial
18- CPLN_ORG : ${{ secrets.CPLN_ORG }}
19- UPSTREAM_TOKEN : ${{ secrets.STAGING_TOKEN }}
20-
2116 steps :
2217 - name : Checkout code
2318 uses : actions/checkout@v4
2419
2520 - name : Setup Environment
2621 uses : ./.github/actions/setup-environment
27- env :
28- CPLN_TOKEN : ${{ secrets.CPLN_TOKEN }}
22+ with :
23+ token : ${{ secrets.CPLN_TOKEN_PRODUCTION }}
24+ org : ${{ vars.CPLN_ORG_PRODUCTION }}
2925
30- - name : Promote Staging to Production
31- id : promote
32- run : |
33- echo "🚀 Starting promotion from staging to production..."
34-
35- if ! cpflow promote-app-from-upstream -a "${APP_NAME}" -t "${UPSTREAM_TOKEN}" --org "${CPLN_ORG}"; then
36- echo "❌ Failed to promote staging to production"
37- exit 1
38- fi
39-
40- echo "✅ Successfully promoted staging to production"
26+ - name : Copy Image from Staging
27+ run : cpflow copy-image-from-upstream -a ${{ vars.PRODUCTION_APP_NAME }} -t ${{ secrets.CPLN_TOKEN_STAGING }}
28+
29+ - name : Deploy Image to Production
30+ run : cpflow deploy-image -a ${{ vars.PRODUCTION_APP_NAME }} --run-release-phase --org ${{ vars.CPLN_ORG_PRODUCTION }}
4131
4232 - name : Create GitHub Release
4333 if : success()
You can’t perform that action at this time.
0 commit comments