forked from Yubico/yubico-pam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Yubico#204 from Yubico/scan
Adding a static code analysis github workflow
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: static code analysis | ||
|
||
on: [push] | ||
env: | ||
SCAN_IMG: | ||
yes-docker-local.artifactory.in.yubico.org/static-code-analysis/c:v1 | ||
COMPILE_DEPS: "libykclient-dev libykpers-1-dev libyubikey-dev" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Prep scan | ||
run: | | ||
docker login yes-docker-local.artifactory.in.yubico.org/ \ | ||
-u svc-static-code-analysis-reader \ | ||
-p ${{ secrets.ARTIFACTORY_READER_TOKEN }} | ||
docker pull ${SCAN_IMG} | ||
- name: Scan and fail if warnings | ||
run: | | ||
docker run -v${PWD}:/k -e COMPILE_DEPS="${COMPILE_DEPS}" \ | ||
-e PROJECT_NAME=${GITHUB_REPOSITORY#Yubico/} -t ${SCAN_IMG} | ||
- uses: actions/upload-artifact@master | ||
if: failure() | ||
with: | ||
name: suppression_files | ||
path: suppression_files |