Skip to content

Commit 7f218b4

Browse files
committed
Restore fork detection
1 parent 60e4371 commit 7f218b4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

github-action-build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,13 @@ EOL
8181
echo "Output of failed attempt follows:"
8282
echo "$ciURL"
8383
else
84+
ciRepo=${ciURL##*/}
85+
ciPrefix=${ciURL%/*}
86+
ciOrg=${ciPrefix##*/}
8487
if [ ! "$SIGNING_ASC" ] || [ ! "$GPG_KEY_NAME" ] || [ ! "$GPG_PASSPHRASE" ] || [ ! "$MAVEN_PASS" ] || [ ! "$OSSRH_PASS" ]; then
8588
echo "No deploy -- secure environment variables not available"
89+
elif [ "${GITHUB_REPOSITORY}" != "$ciOrg/$ciRepo" ]; then
90+
echo "No deploy -- repository fork: ${GITHUB_REPOSITORY} != $ciOrg/$ciRepo"
8691
else
8792
echo "All checks passed for artifact deployment"
8893
deployOK=1

0 commit comments

Comments
 (0)