File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 ciRepo=${ciURL##*/ }
8484 ciPrefix=${ciURL%/* }
8585 ciOrg=${ciPrefix##*/ }
86- curl -o pull-request.txt https://api.github.com/repos/$ciOrg /$ciRepo /pulls
87- if [ ${secure_env} != true ]; then
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/scijava/actions/secrets # Check for secure env var
88+ if [ grep -q " documentation_url" secure-env.txt > /dev/null 2>&1 ]; then
8889 echo " No deploy -- secure environment variables not available"
89- elif [ grep -o " url" pull-request.txt > /dev/null 2>&1 ]; then
90+ elif [ grep -q " url" pull-request.txt > /dev/null 2>&1 ]; then
9091 echo " No deploy -- pull request detected"
9192 elif [ ${repo_fork} != " $ciOrg /$ciRepo " ]; then
9293 echo " No deploy -- repository fork: ${repo_fork} != $ciOrg /$ciRepo "
9394 else
9495 echo " All checks passed for artifact deployment"
9596 deployOK=1
9697 fi
97- rm pull-request.txt # delete created txt file
98+ # Delete created txt file
99+ rm pull-request.txt
100+ rm secure-env.txt
98101 fi
99102
100103 # Install GPG on OSX/macOS
You can’t perform that action at this time.
0 commit comments