Skip to content

Commit 0dd7462

Browse files
committed
fix: Job summary fix
1 parent 2c32abe commit 0dd7462

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

.github/workflows/deploy-opencrvs.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ on:
1818
core-image-tag:
1919
description: "Tag of the core image"
2020
required: true
21-
default: "develop"
21+
default: "v1.9.0-beta-1"
2222
countryconfig-image-tag:
2323
description: "Tag of the countryconfig image"
2424
required: true
25-
default: "develop"
25+
default: "v1.9.0-beta-1"
2626
environment:
2727
description: "Target environment"
2828
required: true
@@ -64,17 +64,31 @@ jobs:
6464
- uses: actions/checkout@v5
6565
- name: Generate summary
6666
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
7892
- name: Deploy OpenCRVS MOSIP API
7993
if: inputs.deploy_mosip
8094
run: |
@@ -97,9 +111,6 @@ jobs:
97111
| kubectl apply -n opencrvs-${ENV} -f - \
98112
|| echo "Secret $secret doesn't exist in opencrvs-deps-${ENV} namespace"
99113
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
103114
- name: Deploy with Helm
104115
run: |
105116
helm upgrade --install opencrvs oci://ghcr.io/opencrvs/opencrvs-services \

0 commit comments

Comments
 (0)