|
18 | 18 | core-image-tag: |
19 | 19 | description: "Tag of the core image" |
20 | 20 | required: true |
21 | | - default: "develop" |
| 21 | + default: "v1.9.0-beta-1" |
22 | 22 | countryconfig-image-tag: |
23 | 23 | description: "Tag of the countryconfig image" |
24 | 24 | required: true |
25 | | - default: "develop" |
| 25 | + default: "v1.9.0-beta-1" |
26 | 26 | environment: |
27 | 27 | description: "Target environment" |
28 | 28 | required: true |
@@ -64,17 +64,31 @@ jobs: |
64 | 64 | - uses: actions/checkout@v5 |
65 | 65 | - name: Generate summary |
66 | 66 | run: | |
67 | | - echo "Deploying environment to https://${{ vars.DOMAIN }}" >> $GITHUB_STEP_SUMMARY |
68 | | - echo "Core image tag: ${{ inputs.core-image-tag }}" >> $GITHUB_STEP_SUMMARY |
69 | | - echo "Country config image tag: ${{ inputs.countryconfig-image-tag }}" >> $GITHUB_STEP_SUMMARY |
70 | | - echo "Reset environment: ${{ inputs.reset }}" >> $GITHUB_STEP_SUMMARY |
71 | | - - name: Print deployment parameters |
72 | | - run: | |
73 | | - echo "Environment: $ENV" |
74 | | - echo "Core Image: $CORE_IMAGE_TAG" |
75 | | - echo "Country Config Image: $COUNTRYCONFIG_IMAGE_TAG" |
76 | | - echo "base_ref: ${{ github.base_ref }}" |
77 | | - echo "branch: ${BRANCH}" |
| 67 | + # set the mark (colored emoji) |
| 68 | + RESET="${{ inputs.reset }}" |
| 69 | + if [ "$RESET" = "true" ]; then |
| 70 | + RESET_MARK="<span style='color:green'>✅ Yes</span>" |
| 71 | + else |
| 72 | + RESET_MARK="<span style='color:red'>❌ No</span>" |
| 73 | + fi |
| 74 | +
|
| 75 | + # build the summary into a variable (unquoted heredoc so $RESET_MARK expands) |
| 76 | + SUMMARY=$(cat <<EOF |
| 77 | + ### Deployment Summary |
| 78 | +
|
| 79 | + | Key | Value | |
| 80 | + |-----|-------| |
| 81 | + | 🌐 Environment URL | https://${{ vars.DOMAIN }} | |
| 82 | + | 🛠 Core image tag | \`${{ inputs.core-image-tag }}\` | |
| 83 | + | 📦 Country config image | \`${{ inputs.countryconfig-image-tag }}\` | |
| 84 | + | 🌿 Branch name | \`${{ github.ref_name }}\` | |
| 85 | + | 🔄 Reset environment | $RESET_MARK | |
| 86 | + EOF |
| 87 | + ) |
| 88 | +
|
| 89 | + # strip the leading 4-space indentation that we used for readability in the workflow, |
| 90 | + # then append the cleaned output to the GitHub Actions summary (single append) |
| 91 | + echo "$SUMMARY" | sed 's/^ //' >> $GITHUB_STEP_SUMMARY |
78 | 92 | - name: Deploy OpenCRVS MOSIP API |
79 | 93 | if: inputs.deploy_mosip |
80 | 94 | run: | |
|
97 | 111 | | kubectl apply -n opencrvs-${ENV} -f - \ |
98 | 112 | || echo "Secret $secret doesn't exist in opencrvs-deps-${ENV} namespace" |
99 | 113 | done |
100 | | - - name: "FIXME: temporary remove data-migration job due to issues" |
101 | | - run: | |
102 | | - kubectl delete job -n "opencrvs-${ENV}" --ignore-not-found=true data-migration || true |
103 | 114 | - name: Deploy with Helm |
104 | 115 | run: | |
105 | 116 | helm upgrade --install opencrvs oci://ghcr.io/opencrvs/opencrvs-services \ |
|
0 commit comments