File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 9
9
env :
10
10
SCAN_IMG :
11
11
yes-docker-local.artifactory.in.yubico.org/static-code-analysis/java:v1
12
+ SECRET : ${{ secrets.ARTIFACTORY_READER_TOKEN }}
12
13
13
14
jobs :
14
15
build :
@@ -17,17 +18,17 @@ jobs:
17
18
steps :
18
19
- uses : actions/checkout@master
19
20
20
- - name : Prep scan
21
- run : |
22
- docker login yes-docker-local.artifactory.in.yubico.org/ \
23
- -u svc-static-code-analysis-reader \
24
- -p ${{ secrets.ARTIFACTORY_READER_TOKEN }}
25
- docker pull ${SCAN_IMG}
26
-
27
21
- name : Scan and fail on warnings
28
22
run : |
29
- docker run -v${PWD}:/k \
30
- -e PROJECT_NAME=${GITHUB_REPOSITORY#Yubico/} -t ${SCAN_IMG}
23
+ if [ "${SECRET}" != "" ]; then
24
+ docker login yes-docker-local.artifactory.in.yubico.org/ \
25
+ -u svc-static-code-analysis-reader -p ${SECRET}
26
+ docker pull ${SCAN_IMG}
27
+ docker run -v${PWD}:/k \
28
+ -e PROJECT_NAME=${GITHUB_REPOSITORY#Yubico/} -t ${SCAN_IMG}
29
+ else
30
+ echo "No docker registry credentials, not scanning"
31
+ fi
31
32
32
33
- uses : actions/upload-artifact@master
33
34
if : failure()
You can’t perform that action at this time.
0 commit comments