Skip to content

Commit e6b855e

Browse files
author
Jack Yuan
committed
change pr method (test)
1 parent a0e4229 commit e6b855e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

github-action-build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@ EOL
8383
ciRepo=${ciURL##*/}
8484
ciPrefix=${ciURL%/*}
8585
ciOrg=${ciPrefix##*/}
86-
if [ ${secure_env} != true ]; then
87-
echo "No deploy -- secure environment variables not available"
88-
elif [ ${pull_request} != false ]; then
86+
curl -o pull-request.txt https://api.github.com/repos/$ciOrg/$ciRepo/pulls
87+
# if [ ${secure_env} != true ]; then
88+
# echo "No deploy -- secure environment variables not available"
89+
if [ grep -q "url" pull-request.txt ]; then
8990
echo "No deploy -- pull request detected"
9091
elif [ ${repo_fork} != "$ciOrg/$ciRepo" ]; then
9192
echo "No deploy -- repository fork: ${repo_fork} != $ciOrg/$ciRepo"
9293
else
9394
echo "All checks passed for artifact deployment"
9495
deployOK=1
9596
fi
97+
rm pull-request.txt # delete created txt file
9698
fi
9799

98100
# Install GPG on OSX/macOS

0 commit comments

Comments
 (0)