|
19 | 19 | strategy: |
20 | 20 | fail-fast: ${{ github.event_name != 'release' }} |
21 | 21 | matrix: |
22 | | - php: ["8.1", "8.0", "7.4"] |
| 22 | + php: ["8.1", "8.0"] |
23 | 23 | type: ["php-fpm", "cli"] |
24 | 24 | include: |
25 | 25 | - type: php-fpm |
@@ -120,97 +120,97 @@ jobs: |
120 | 120 | PHP_VERSION=${{ matrix.php }} |
121 | 121 |
|
122 | 122 | build-nginx-images: |
123 | | - name: Build NGINX images |
124 | | - needs: build-php-images |
125 | | - runs-on: ubuntu-latest |
126 | | - strategy: |
127 | | - fail-fast: ${{ github.event_name != 'release' }} |
128 | | - matrix: |
129 | | - php: ["8.1", "8.0", "7.4"] |
130 | | - steps: |
131 | | - - name: Set env |
132 | | - run: | |
133 | | - echo "PROD_IMAGE_REF=craftcms/nginx:${{ matrix.php }}" >> $GITHUB_ENV |
134 | | - echo "DEV_IMAGE_REF=craftcms/nginx:${{ matrix.php }}-dev" >> $GITHUB_ENV |
135 | | - echo "BASE_PROD_IMAGE_TAG=${{ matrix.php }}" >> $GITHUB_ENV |
136 | | - echo "BASE_DEV_IMAGE_TAG=${{ matrix.php }}-dev" >> $GITHUB_ENV |
137 | | -
|
138 | | - - name: Check out the repository |
139 | | - uses: actions/checkout@v2 |
140 | | - |
141 | | - - name: Set up QEMU |
142 | | - uses: docker/setup-qemu-action@v1 |
143 | | - |
144 | | - - name: Set up Docker Buildx |
145 | | - uses: docker/setup-buildx-action@v1 |
146 | | - with: |
147 | | - install: true |
148 | | - |
149 | | - - name: Build production image for Snyk test |
150 | | - uses: docker/build-push-action@v2 |
151 | | - with: |
152 | | - context: nginx |
153 | | - push: false |
154 | | - load: true |
155 | | - tags: ${{ env.PROD_IMAGE_REF }} |
156 | | - build-args: | |
157 | | - PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} |
158 | | -
|
159 | | - - name: Snyk test production image |
160 | | - uses: snyk/actions/docker@master |
161 | | - env: |
162 | | - SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} |
163 | | - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
164 | | - with: |
165 | | - image: ${{ env.PROD_IMAGE_REF }} |
166 | | - args: --file=nginx/Dockerfile |
167 | | - |
168 | | - - name: Login to Docker Hub |
169 | | - uses: docker/login-action@v1 |
170 | | - if: github.event_name == 'release' |
171 | | - with: |
172 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
173 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
174 | | - |
175 | | - - name: Build & push production image |
176 | | - uses: docker/build-push-action@v2 |
177 | | - if: github.event_name == 'release' |
178 | | - with: |
179 | | - context: nginx |
180 | | - push: true |
181 | | - platforms: ${{ env.BUILD_PLATFORMS }} |
182 | | - tags: ${{ env.PROD_IMAGE_REF }} |
183 | | - build-args: | |
184 | | - PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} |
185 | | -
|
186 | | - - name: Build development image for Snyk test |
187 | | - uses: docker/build-push-action@v2 |
188 | | - with: |
189 | | - context: nginx |
190 | | - push: false |
191 | | - load: true |
192 | | - tags: ${{ env.DEV_IMAGE_REF }} |
193 | | - build-args: | |
194 | | - PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} |
195 | | - NGINX_CONF=dev.default.conf |
196 | | -
|
197 | | - - name: Snyk test development image |
198 | | - uses: snyk/actions/docker@master |
199 | | - env: |
200 | | - SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} |
201 | | - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
202 | | - with: |
203 | | - image: ${{ env.DEV_IMAGE_REF }} |
204 | | - args: --file=nginx/Dockerfile |
205 | | - |
206 | | - - name: Build & push development image |
207 | | - uses: docker/build-push-action@v2 |
208 | | - if: github.event_name == 'release' |
209 | | - with: |
210 | | - context: nginx |
211 | | - push: true |
212 | | - platforms: ${{ env.BUILD_PLATFORMS }} |
213 | | - tags: ${{ env.DEV_IMAGE_REF }} |
214 | | - build-args: | |
215 | | - PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} |
216 | | - NGINX_CONF=dev.default.conf |
| 123 | + name: Build NGINX images |
| 124 | + needs: build-php-images |
| 125 | + runs-on: ubuntu-latest |
| 126 | + strategy: |
| 127 | + fail-fast: ${{ github.event_name != 'release' }} |
| 128 | + matrix: |
| 129 | + php: ["8.1", "8.0"] |
| 130 | + steps: |
| 131 | + - name: Set env |
| 132 | + run: | |
| 133 | + echo "PROD_IMAGE_REF=craftcms/nginx:${{ matrix.php }}" >> $GITHUB_ENV |
| 134 | + echo "DEV_IMAGE_REF=craftcms/nginx:${{ matrix.php }}-dev" >> $GITHUB_ENV |
| 135 | + echo "BASE_PROD_IMAGE_TAG=${{ matrix.php }}" >> $GITHUB_ENV |
| 136 | + echo "BASE_DEV_IMAGE_TAG=${{ matrix.php }}-dev" >> $GITHUB_ENV |
| 137 | +
|
| 138 | + - name: Check out the repository |
| 139 | + uses: actions/checkout@v2 |
| 140 | + |
| 141 | + - name: Set up QEMU |
| 142 | + uses: docker/setup-qemu-action@v1 |
| 143 | + |
| 144 | + - name: Set up Docker Buildx |
| 145 | + uses: docker/setup-buildx-action@v1 |
| 146 | + with: |
| 147 | + install: true |
| 148 | + |
| 149 | + - name: Build production image for Snyk test |
| 150 | + uses: docker/build-push-action@v2 |
| 151 | + with: |
| 152 | + context: nginx |
| 153 | + push: false |
| 154 | + load: true |
| 155 | + tags: ${{ env.PROD_IMAGE_REF }} |
| 156 | + build-args: | |
| 157 | + PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} |
| 158 | +
|
| 159 | + - name: Snyk test production image |
| 160 | + uses: snyk/actions/docker@master |
| 161 | + env: |
| 162 | + SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} |
| 163 | + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
| 164 | + with: |
| 165 | + image: ${{ env.PROD_IMAGE_REF }} |
| 166 | + args: --file=nginx/Dockerfile |
| 167 | + |
| 168 | + - name: Login to Docker Hub |
| 169 | + uses: docker/login-action@v1 |
| 170 | + if: github.event_name == 'release' |
| 171 | + with: |
| 172 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 173 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 174 | + |
| 175 | + - name: Build & push production image |
| 176 | + uses: docker/build-push-action@v2 |
| 177 | + if: github.event_name == 'release' |
| 178 | + with: |
| 179 | + context: nginx |
| 180 | + push: true |
| 181 | + platforms: ${{ env.BUILD_PLATFORMS }} |
| 182 | + tags: ${{ env.PROD_IMAGE_REF }} |
| 183 | + build-args: | |
| 184 | + PHP_VERSION=${{ env.BASE_PROD_IMAGE_TAG }} |
| 185 | +
|
| 186 | + - name: Build development image for Snyk test |
| 187 | + uses: docker/build-push-action@v2 |
| 188 | + with: |
| 189 | + context: nginx |
| 190 | + push: false |
| 191 | + load: true |
| 192 | + tags: ${{ env.DEV_IMAGE_REF }} |
| 193 | + build-args: | |
| 194 | + PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} |
| 195 | + NGINX_CONF=dev.default.conf |
| 196 | +
|
| 197 | + - name: Snyk test development image |
| 198 | + uses: snyk/actions/docker@master |
| 199 | + env: |
| 200 | + SNYK_CFG_ORG: ${{ secrets.SNYK_CFG_ORG }} |
| 201 | + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
| 202 | + with: |
| 203 | + image: ${{ env.DEV_IMAGE_REF }} |
| 204 | + args: --file=nginx/Dockerfile |
| 205 | + |
| 206 | + - name: Build & push development image |
| 207 | + uses: docker/build-push-action@v2 |
| 208 | + if: github.event_name == 'release' |
| 209 | + with: |
| 210 | + context: nginx |
| 211 | + push: true |
| 212 | + platforms: ${{ env.BUILD_PLATFORMS }} |
| 213 | + tags: ${{ env.DEV_IMAGE_REF }} |
| 214 | + build-args: | |
| 215 | + PHP_VERSION=${{ env.BASE_DEV_IMAGE_TAG }} |
| 216 | + NGINX_CONF=dev.default.conf |
0 commit comments