File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -76,19 +76,21 @@ github_repo_name=$(echo "${github_repo}" | sed 's/^.*\///g')
76
76
git_head_sha=$( git rev-parse --verify HEAD)
77
77
78
78
if [ " $git_branch " == " $main_git_branch " ]; then
79
+ deployment_environment = " production"
79
80
deployment_url=" https://${github_repo_owner} .github.io/${github_repo_name} /"
80
81
else
82
+ deployment_environment = " qa"
81
83
deployment_url=" https://${github_repo_owner} .github.io/${github_repo_name} /branches/${git_branch} "
82
84
fi
83
85
84
86
update_github_checks_req_data () {
85
87
cat << EOF
86
88
{
87
89
"name": "deployment",
88
- "head_sha ": "${git_head_sha } ",
89
- "status ": "completed ",
90
- "conclusion ": "success ",
91
- "details_url ": "${deployment_url} "
90
+ "ref ": "${git_branch } ",
91
+ "environment ": "${deployment_environment} ",
92
+ "payload ": "some payload https://xyz.abc ",
93
+ "description ": "some description https://abc.xyz "
92
94
}
93
95
EOF
94
96
}
@@ -100,6 +102,6 @@ curl -i \
100
102
--header " Content-Type: application/json" \
101
103
--data " $( update_github_checks_req_data) " \
102
104
--fail \
103
- https://api.github.com/repos/${github_repo_owner} /${github_repo_name} /check-runs
105
+ https://api.github.com/repos/${github_repo_owner} /${github_repo_name} /deployments
104
106
105
107
echo " Deployment is available at: '${deployment_url} '"
You can’t perform that action at this time.
0 commit comments