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:
commit
609496765a
32
.github/workflows/scan.yml
vendored
Normal file
32
.github/workflows/scan.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user