Add Coverity Scan Github Action #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverity Scan | |
| on: | |
| push: | |
| branches: [coverity_scan] | |
| jobs: | |
| coverity: | |
| if: github.repository == 'web-eid/web-eid-authtoken-validation-php' | |
| runs-on: ubuntu-latest | |
| env: | |
| TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| PROJECTNAME: 'web-eid/web-eid-authtoken-validation-php' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download Coverity Build Tool | |
| run: | | |
| curl --silent --data "token=$TOKEN&project=$PROJECTNAME" -o cov-analysis-linux64.tar.gz https://scan.coverity.com/download/linux64 | |
| mkdir cov-analysis-linux64 | |
| tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 | |
| - name: Build | |
| run: | | |
| export PATH=$PWD/cov-analysis-linux64/bin:$PATH | |
| coverity capture --dir cov-int --project-dir . | |
| - name: Submit the result to Coverity Scan | |
| run: | | |
| tar czvf upload.tgz cov-int | |
| curl --silent \ | |
| --form project=$PROJECTNAME \ | |
| --form token=$TOKEN \ | |
| --form [email protected] \ | |
| --form [email protected] \ | |
| --form version=master \ | |
| --form description="Github Actions CI build" \ | |
| https://scan.coverity.com/builds?project=$PROJECTNAME |