File tree 2 files changed +9
-19
lines changed
2 files changed +9
-19
lines changed Original file line number Diff line number Diff line change 46
46
allow_app_override_by_env : false
47
47
48
48
# Use a different organization for production.
49
- cpln_org : shakacode-open-source-examples
49
+ cpln_org : shakacode-open-source-examples-production
50
50
51
51
upstream : react-webpack-rails-tutorial-staging
52
52
Original file line number Diff line number Diff line change @@ -13,31 +13,21 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
if : github.event.inputs.confirm_promotion == 'promote'
15
15
16
- env :
17
- APP_NAME : react-webpack-rails-tutorial
18
- CPLN_ORG : ${{ secrets.CPLN_ORG }}
19
- UPSTREAM_TOKEN : ${{ secrets.STAGING_TOKEN }}
20
-
21
16
steps :
22
17
- name : Checkout code
23
18
uses : actions/checkout@v4
24
19
25
20
- name : Setup Environment
26
21
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 }}
29
25
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 }}
41
31
42
32
- name : Create GitHub Release
43
33
if : success()
You can’t perform that action at this time.
0 commit comments