SQSCANGHA-3 Permission cleanup doesn't run if the scanner exits with a non-0 code (#33)

This commit is contained in:
Benjamin Svobodny
2022-07-05 09:15:01 -04:00
committed by GitHub
parent bdba66714e
commit fd8151470c
6 changed files with 14 additions and 5 deletions

View File

@@ -91,6 +91,7 @@ success "Correctly failed fast."
info "Analyze project..."
cd test/example-project/
docker run -v `pwd`:/github/workspace/ --workdir /github/workspace --network $network --env INPUT_PROJECTBASEDIR=/github/workspace --env SONAR_TOKEN=$token --env SONAR_HOST_URL='http://sonarqube:9000' sonarsource/sonarqube-scan-action
docker run -v `pwd`:/github/workspace/ --workdir /github/workspace --network $network --env INPUT_PROJECTBASEDIR=/github/workspace --entrypoint /cleanup.sh sonarsource/sonarqube-scan-action
if [[ ! $? -eq 0 ]]; then
error "Couldn't run the analysis."
exit 1