Skip to content

Commit

Permalink
Merge pull request #54 from codacy/fix-standalone-tools-1
Browse files Browse the repository at this point in the history
fix: Download binaries to existing directory
  • Loading branch information
rtfpessoa committed May 4, 2021
2 parents 2943285 + 5bebb3e commit 84fbefe
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ runs:
curl -fsSL https://api.github.com/repos/codacy/codacy-gosec/releases/latest \
| grep "browser_download_url" | grep -v "browser_download_url.*jar" \
| cut -d '"' -f 4 \
| xargs -L 1 curl -fsSL -o /tmp/bin/codacy-gosec
chmod +x ./bin/codacy-gosec
| xargs -L 1 curl -fsSL -o /tmp/codacy-gosec
chmod +x /tmp/codacy-gosec
cd -
/tmp/bin/gosec -no-fail -fmt json -log /tmp/log.txt ./... > /tmp/gosec-out.json
/tmp/bin/codacy-gosec < /tmp/gosec-out.json > /tmp/codacy-out.json
/tmp/codacy-gosec < /tmp/gosec-out.json > /tmp/codacy-out.json
if [ ${{ inputs.upload }} = true ]; then
curl -XPOST -L -H "$CURL_CODACY_AUTH_AUTHENTICATION" \
-H "Content-type: application/json" --data-binary @/tmp/codacy-out.json \
Expand Down Expand Up @@ -147,12 +147,12 @@ runs:
curl -fsSL https://api.github.com/repos/codacy/codacy-staticcheck/releases/latest \
| grep "browser_download_url" | grep -v "browser_download_url.*jar" \
| cut -d '"' -f 4 \
| xargs -L 1 curl -fsSL -o /tmp/bin/codacy-staticcheck
chmod +x ./bin/codacy-staticcheck
| xargs -L 1 curl -fsSL -o /tmp/codacy-staticcheck
chmod +x /tmp/codacy-staticcheck
cd -
find . -type f -name go.mod -exec bash -c 'cd $(dirname $1); PKGS=$(go list ./...); /tmp/staticcheck/staticcheck -f json $PKGS' _ {} \; > /tmp/staticcheck-out.json
/tmp/bin/codacy-staticcheck < /tmp/staticcheck-out.json > /tmp/codacy-out.json
/tmp/codacy-staticcheck < /tmp/staticcheck-out.json > /tmp/codacy-out.json
if [ ${{ inputs.upload }} = true ]; then
curl -XPOST -L -H "$CURL_CODACY_AUTH_AUTHENTICATION" \
-H "Content-type: application/json" --data-binary @/tmp/codacy-out.json \
Expand All @@ -174,11 +174,11 @@ runs:
curl -fsSL https://api.github.com/repos/codacy/codacy-clang-tidy/releases/latest \
| grep "browser_download_url" | grep -v "browser_download_url.*jar" \
| cut -d '"' -f 4 \
| xargs -L 1 curl -fsSL -o /tmp/bin/codacy-clang-tidy
chmod +x ./bin/codacy-clang-tidy
| xargs -L 1 curl -fsSL -o /tmp/codacy-clang-tidy
chmod +x /tmp/codacy-clang-tidy
cd -
/tmp/bin/codacy-clang-tidy < "${{ inputs.clang-tidy-output }}" > /tmp/codacy-out.json
/tmp/codacy-clang-tidy < "${{ inputs.clang-tidy-output }}" > /tmp/codacy-out.json
if [ ${{ inputs.upload }} = true ]; then
curl -XPOST -L -H "$CURL_CODACY_AUTH_AUTHENTICATION" \
-H "Content-type: application/json" --data-binary @/tmp/codacy-out.json \
Expand All @@ -200,11 +200,11 @@ runs:
curl -fsSL https://api.github.com/repos/codacy/codacy-faux-pas/releases/latest \
| grep "browser_download_url" | grep -v "browser_download_url.*jar" \
| cut -d '"' -f 4 \
| xargs -L 1 curl -fsSL -o /tmp/bin/codacy-faux-pas
chmod +x ./bin/codacy-faux-pas
| xargs -L 1 curl -fsSL -o /tmp/codacy-faux-pas
chmod +x /tmp/codacy-faux-pas
cd -
/tmp/bin/codacy-faux-pas < "${{ inputs.faux-pas-output }}" > /tmp/codacy-out.json
/tmp/codacy-faux-pas < "${{ inputs.faux-pas-output }}" > /tmp/codacy-out.json
if [ ${{ inputs.upload }} = true ]; then
curl -XPOST -L -H "$CURL_CODACY_AUTH_AUTHENTICATION" \
-H "Content-type: application/json" --data-binary @/tmp/codacy-out.json \
Expand Down

0 comments on commit 84fbefe

Please sign in to comment.