Skip to content

Commit 7a1e728

Browse files
author
Jack Yuan
committed
test
1 parent 6a2be7a commit 7a1e728

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

github-action-build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ EOL
8383
ciRepo=${ciURL##*/}
8484
ciPrefix=${ciURL%/*}
8585
ciOrg=${ciPrefix##*/}
86-
curl -o pull-request.txt https://api.github.com/repos/$ciOrg/$ciRepo/pulls # Check for pull requests
87-
curl -o secure-env.txt https://api.github.com/orgs/$ciOrg/$ciRepo/secrets # Check for secure env var
88-
if [ grep -q "documentation_url" secure-env.txt >/dev/null 2>&1 ]; then
86+
curl -o pull-request.txt https://api.github.com/repos/$ciOrg/$ciRepo/pulls >/dev/null 2>&1 # Check for pull requests
87+
curl -o secure-env.txt https://api.github.com/orgs/$ciOrg/$ciRepo/secrets >/dev/null 2>&1 # Check for secure env var
88+
if [ ! grep -q "documentation_url" secure-env.txt ]; then
8989
echo "No deploy -- secure environment variables not available"
90-
elif [ grep -q "url" pull-request.txt >/dev/null 2>&1 ]; then
90+
elif [ grep -q "url" pull-request.txt ]; then
9191
echo "No deploy -- pull request detected"
9292
elif [ ${repo_fork} != "$ciOrg/$ciRepo" ]; then
9393
echo "No deploy -- repository fork: ${repo_fork} != $ciOrg/$ciRepo"

0 commit comments

Comments
 (0)