-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: only run the coverity workflow on our repository
Also, get the project version dynamically using meson introspect.
- Loading branch information
1 parent
9a32d17
commit b0ad534
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
|
||
jobs: | ||
coverity: | ||
if: github.repository == 'canonical/netplan' | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
|
@@ -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" | ||
|
@@ -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 |