add condition event only in PR

This commit is contained in:
dw1 2020-01-30 16:36:39 +07:00
parent b74f7cb670
commit 9843b73be8

View File

@ -2,6 +2,14 @@
set -e set -e
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
EVENT_ACTION=$(jq -r ".action" "${GITHUB_EVENT_PATH}")
if [[ "${EVENT_ACTION}" != "opened" ]]; then
echo "No need to run analysis. It is already triggered by the push event."
exit 78
fi
fi
if [[ -z "${INPUT_PASSWORD}" ]]; then if [[ -z "${INPUT_PASSWORD}" ]]; then
SONAR_PASSWORD="&& true" SONAR_PASSWORD="&& true"
else else