File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 env :
5454 INPUT_FORGEJO_TOKEN : ${{ inputs.forgejo-token }}
5555 INPUT_COMMENT_MARKER : ${{ inputs.comment-marker }}
56- INPUT_DEPLOYMENT_URL : ${{ steps.deploy.outputs.deployment-alias-url || steps.deploy.outputs.deployment-url }}
56+ INPUT_DEPLOYMENT_URL : ${{ steps.deploy.outputs.deployment-url }}
57+ INPUT_ALIAS_URL : ${{ steps.deploy.outputs.deployment-alias-url }}
5758 INPUT_ENVIRONMENT : ${{ steps.deploy.outputs.environment }}
5859 run : ${{ github.action_path }}/comment.sh
Original file line number Diff line number Diff line change 22set -euo pipefail
33
44DEPLOYMENT_URL=" ${INPUT_DEPLOYMENT_URL:- } "
5- if [ -z " $DEPLOYMENT_URL " ]; then
5+ ALIAS_URL=" ${INPUT_ALIAS_URL:- } "
6+ if [ -z " $DEPLOYMENT_URL " ] && [ -z " $ALIAS_URL " ]; then
67 echo " No deployment URL, skipping comment"
78 exit 0
89fi
@@ -17,8 +18,19 @@ BODY="${MARKER}
1718### Cloudflare Pages Preview
1819
1920| | |
20- |---|---|
21- | **Preview URL** | ${DEPLOYMENT_URL} |
21+ |---|---|"
22+
23+ if [ -n " $ALIAS_URL " ]; then
24+ BODY+="
25+ | **Preview URL** | ${ALIAS_URL} |"
26+ fi
27+
28+ if [ -n " $DEPLOYMENT_URL " ]; then
29+ BODY+="
30+ | **Commit URL** | ${DEPLOYMENT_URL} |"
31+ fi
32+
33+ BODY+="
2234| **Commit** | \` ${SHORT_SHA} \` |
2335| **Environment** | ${ENVIRONMENT} |"
2436
You can’t perform that action at this time.
0 commit comments