1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2024-11-29 00:24:11 +01:00

Merge pull request #204 from Yubico/scan

Adding a static code analysis github workflow
This commit is contained in:
Gabriel Kihlman 2019-12-11 09:50:00 +01:00 committed by GitHub
commit 609496765a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

32
.github/workflows/scan.yml vendored Normal file
View File

@ -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