SONAR-16068 made SONAR_TOKEN optional
SONAR-16067 fixed file permissions
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
set -e
|
||||
|
||||
if [[ -z "${SONAR_TOKEN}" ]]; then
|
||||
echo "This GitHub Action requires the SONAR_TOKEN env variable."
|
||||
exit 1
|
||||
echo "============================ WARNING ============================"
|
||||
echo "Running this GitHub Action without SONAR_TOKEN is not recommended"
|
||||
echo "============================ WARNING ============================"
|
||||
fi
|
||||
|
||||
if [[ -z "${SONAR_HOST_URL}" ]]; then
|
||||
@@ -25,3 +26,8 @@ fi
|
||||
unset JAVA_HOME
|
||||
|
||||
sonar-scanner -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} ${INPUT_ARGS}
|
||||
|
||||
_tmp_file=$(ls "${INPUT_PROJECTBASEDIR}/" | head -1)
|
||||
PERM=$(stat -c "%u:%g" "${INPUT_PROJECTBASEDIR}/$_tmp_file")
|
||||
|
||||
chown -R $PERM "${INPUT_PROJECTBASEDIR}/"
|
||||
|
||||
Reference in New Issue
Block a user