Skip to content

Commit

Permalink
github: only run the coverity workflow on our repository
Browse files Browse the repository at this point in the history
Also, get the project version dynamically using meson introspect.
  • Loading branch information
daniloegea committed Aug 10, 2023
1 parent 9a32d17 commit b0ad534
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
coverity:
if: github.repository == 'canonical/netplan'
runs-on: ubuntu-22.04

steps:
Expand All @@ -15,7 +16,7 @@ jobs:
sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list
sudo apt update
sudo apt -y build-dep netplan.io
sudo apt -y install libcmocka-dev meson python3-pytest curl
sudo apt -y install libcmocka-dev meson python3-pytest curl jq
- name: Download Coverity
run: |
curl https://scan.coverity.com/download/cxx/linux64 --no-progress-meter --output ${HOME}/coverity.tar.gz --data "token=${{ secrets.COVERITY_TOKEN }}&project=Netplan"
Expand All @@ -29,4 +30,4 @@ jobs:
tar czf netplan.tar.gz cov-int
- name: Upload results
run: |
curl --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form [email protected] --form version="0.106" --form description="Coverity scan" https://scan.coverity.com/builds?project=Netplan
curl --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form [email protected] --form version="$(meson introspect coveritybuild --projectinfo | jq -r .version)" --form description="Coverity scan" https://scan.coverity.com/builds?project=Netplan

0 comments on commit b0ad534

Please sign in to comment.