Skip to content

Commit 0322af8

Browse files
committed
update promotion workflow
1 parent f5aca44 commit 0322af8

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.github/workflows/promote-staging-to-production.yml

+8-15
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ jobs:
1414
if: github.event.inputs.confirm_promotion == 'promote'
1515

1616
env:
17-
APP_NAME: react-webpack-rails-tutorial
18-
CPLN_ORG: ${{ secrets.CPLN_ORG }}
19-
UPSTREAM_TOKEN: ${{ secrets.STAGING_TOKEN }}
17+
APP_NAME: ${{ vars.STAGING_APP_NAME }}
18+
UPSTREAM_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }}
2019

2120
steps:
2221
- name: Checkout code
@@ -25,19 +24,13 @@ jobs:
2524
- name: Setup Environment
2625
uses: ./.github/actions/setup-environment
2726
env:
28-
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN }}
27+
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_PRODUCTION }}
2928

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"
29+
- name: Copy Image from Staging
30+
run: cpflow copy-image-from-upstream -a "${APP_NAME}" -t "${UPSTREAM_TOKEN}" -v
31+
32+
- name: Deploy Image to Production
33+
run: cpflow deploy-image -v
4134

4235
- name: Create GitHub Release
4336
if: success()

0 commit comments

Comments
 (0)