Fix coverity yml

This commit is contained in:
gabime
2025-05-12 12:14:24 +03:00
parent 7c155b99c1
commit 4a4acc31e6

View File

@@ -7,7 +7,6 @@ permissions:
jobs:
coverity_scan:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Coverity Scan
steps:
@@ -35,8 +34,18 @@ jobs:
- name: Submit results to Coverity
run: |
tar czf cov-int.tgz cov-int
curl --form token="${{ secrets.COVERITY_TOKEN }}" \
--form file=@cov-int.tgz \
--form version="GitHub PR #${{ github.event.pull_request.number }}" \
--form description="CI run for PR" \
https://scan.coverity.com/builds?project=gabime%2Fspdlog
response=$(curl --silent --show-error --fail \
--form token="${{ secrets.COVERITY_TOKEN }}" \
--form file=@cov-int.tgz \
--form version="GitHub PR #${{ github.event.pull_request.number }}" \
--form description="CI run for PR" \
https://scan.coverity.com/builds?project=gabime%2Fspdlog)
echo "$response"
if echo "$response" | grep -qi "Build successfully submitted"; then
echo "Coverity upload succeeded"
else
echo "Coverity upload failed or was rejected"
exit 1
fi