Skip to content

Commit

Permalink
Merge d9c9521 into dd5299c
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Kihlman committed Feb 19, 2020
2 parents dd5299c + d9c9521 commit e94e8e5
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
yes-docker-local.artifactory.in.yubico.org/static-code-analysis/c:v1
COMPILE_DEPS: "libcurl4-openssl-dev libusb-1.0-0-dev libedit-dev"
PVS_IGNORE_WARNINGS: "V571,V1037"
SECRET: ${{ secrets.ARTIFACTORY_READER_TOKEN }}

jobs:
build:
Expand All @@ -18,18 +19,16 @@ jobs:
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/} \
-e PVS_IGNORE_WARNINGS=${PVS_IGNORE_WARNINGS} -t ${SCAN_IMG}
if [ "${SECRET}" != "" ]; then
docker login yes-docker-local.artifactory.in.yubico.org/ \
-u svc-static-code-analysis-reader -p ${SECRET}
docker pull ${SCAN_IMG}
docker run -v${PWD}:/k -e COMPILE_DEPS="${COMPILE_DEPS}" \
-e PROJECT_NAME=${GITHUB_REPOSITORY#Yubico/} \
-e PVS_IGNORE_WARNINGS=${PVS_IGNORE_WARNINGS} -t ${SCAN_IMG}
fi
- uses: actions/upload-artifact@master
if: failure()
Expand Down

0 comments on commit e94e8e5

Please sign in to comment.