30
30
run : |
31
31
echo "PROD_IMAGE_REF=craftcms/${{ matrix.type }}:${{ matrix.php }}" >> $GITHUB_ENV
32
32
echo "DEV_IMAGE_REF=craftcms/${{ matrix.type }}:${{ matrix.php }}-dev" >> $GITHUB_ENV
33
+ echo "DOCKERFILE=${{ matrix.php }}/Dockerfile" >> $GITHUB_ENV
33
34
echo "DEV_DOCKERFILE=${{ matrix.php }}/dev.Dockerfile" >> $GITHUB_ENV
34
35
35
36
- name : Check out the repository
60
61
SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
61
62
with :
62
63
image : ${{ env.PROD_IMAGE_REF }}
64
+ args : --file=${{ env.DOCKERFILE }}
63
65
64
66
- name : Build development image for Snyk test
65
67
uses : docker/build-push-action@v2
@@ -73,12 +75,13 @@ jobs:
73
75
PROJECT_TYPE=${{ matrix.type }}
74
76
PHP_VERSION=${{ matrix.php }}
75
77
76
- - name : Snyk test develelopment image
78
+ - name : Snyk test development image
77
79
uses : snyk/actions/docker@master
78
80
env :
79
81
SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
80
82
with :
81
83
image : ${{ env.DEV_IMAGE_REF }}
84
+ args : --file=${{ env.DEV_DOCKERFILE }}
82
85
83
86
- name : Login to Docker Hub
84
87
uses : docker/login-action@v1
@@ -112,6 +115,24 @@ jobs:
112
115
PROJECT_TYPE=${{ matrix.type }}
113
116
PHP_VERSION=${{ matrix.php }}
114
117
118
+ - name : Snyk monitor production image
119
+ uses : snyk/actions/docker@master
120
+ env :
121
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
122
+ with :
123
+ command : monitor
124
+ image : ${{ env.DEV_IMAGE_REF }}
125
+ args : --file=${{ env.DOCKERFILE }}
126
+
127
+ - name : Snyk monitor development image
128
+ uses : snyk/actions/docker@master
129
+ env :
130
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
131
+ with :
132
+ command : monitor
133
+ image : ${{ env.DEV_IMAGE_REF }}
134
+ args : --file=${{ env.DEV_DOCKERFILE }}
135
+
115
136
build-nginx-images :
116
137
name : Build NGINX images
117
138
needs : build-php-images
@@ -130,6 +151,7 @@ jobs:
130
151
echo "DEV_IMAGE_REF=craftcms/nginx:${{ matrix.php }}-dev" >> $GITHUB_ENV
131
152
echo "BASE_PROD_IMAGE_TAG=${{ matrix.php }}" >> $GITHUB_ENV
132
153
echo "BASE_DEV_IMAGE_TAG=${{ matrix.php }}-dev" >> $GITHUB_ENV
154
+ echo "DOCKERFILE=${{ matrix.php }}/Dockerfile" >> $GITHUB_ENV
133
155
134
156
- name : Check out the repository
135
157
uses : actions/checkout@v2
@@ -158,6 +180,7 @@ jobs:
158
180
SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
159
181
with :
160
182
image : ${{ env.PROD_IMAGE_REF }}
183
+ args : --file=${{ env.DOCKERFILE }}
161
184
162
185
- name : Build development image for Snyk test
163
186
uses : docker/build-push-action@v2
0 commit comments