@@ -126,59 +126,12 @@ jobs:
126126 if-no-files-found : error
127127 retention-days : 1
128128
129- # Test frontend image with all environment configurations
130- test-frontend-image :
131- runs-on : ubuntu-latest
132- if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release')
133- needs :
134- - build-mina-frontend-image
135- strategy :
136- matrix :
137- environment : [local, webnode, production, development, producer, fuzzing]
138- steps :
139- - name : Git checkout
140- uses : actions/checkout@v5
141-
142- - name : Download frontend digest artifacts
143- uses : actions/download-artifact@v4
144- with :
145- path : /tmp/digests
146- pattern : frontend-*-digests-*
147- merge-multiple : true
148-
149- - name : Set up Docker Buildx
150- uses : docker/setup-buildx-action@v3
151-
152- - name : Login to Docker Hub
153- uses : docker/login-action@v3
154- with :
155- username : ${{ secrets.DOCKERHUB_USERNAME }}
156- password : ${{ secrets.DOCKERHUB_TOKEN }}
157-
158- - name : Get image digest
159- id : digest
160- run : |
161- # Get the first digest from artifacts (we'll test with amd64)
162- DIGEST=$(ls /tmp/digests | head -1)
163- echo "digest=sha256:${DIGEST}" >> $GITHUB_OUTPUT
164-
165- - name : Test frontend image with ${{ matrix.environment }} environment
166- run : |
167- # Pull the image by digest
168- docker pull ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }}
169-
170- # Tag it for easier reference
171- docker tag ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }} test-frontend:${{ matrix.environment }}
172-
173- # Run the test script
174- ./.github/scripts/docker/test-frontend-docker.sh test-frontend:${{ matrix.environment }} ${{ matrix.environment }}
175-
176129 # Push frontend multi-arch manifest
177130 push-frontend-image :
178131 runs-on : ubuntu-latest
179132 if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release')
180133 needs :
181- - test -frontend-image
134+ - build-mina -frontend-image
182135 steps :
183136 - name : Git checkout
184137 uses : actions/checkout@v5
@@ -249,6 +202,53 @@ jobs:
249202 dockerhub_token : ${{ secrets.DOCKERHUB_TOKEN }}
250203 additional_tags : ${{ env.ADDITIONAL_TAGS }}
251204
205+ # Test frontend image with all environment configurations
206+ test-frontend-image :
207+ runs-on : ubuntu-latest
208+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release')
209+ needs :
210+ - push-frontend-image
211+ strategy :
212+ matrix :
213+ environment : [local, webnode, production, development, producer, fuzzing]
214+ steps :
215+ - name : Git checkout
216+ uses : actions/checkout@v5
217+
218+ - name : Download frontend digest artifacts
219+ uses : actions/download-artifact@v4
220+ with :
221+ path : /tmp/digests
222+ pattern : frontend-*-digests-*
223+ merge-multiple : true
224+
225+ - name : Set up Docker Buildx
226+ uses : docker/setup-buildx-action@v3
227+
228+ - name : Login to Docker Hub
229+ uses : docker/login-action@v3
230+ with :
231+ username : ${{ secrets.DOCKERHUB_USERNAME }}
232+ password : ${{ secrets.DOCKERHUB_TOKEN }}
233+
234+ - name : Get image digest
235+ id : digest
236+ run : |
237+ # Get the first digest from artifacts (we'll test with amd64)
238+ DIGEST=$(ls /tmp/digests | head -1)
239+ echo "digest=sha256:${DIGEST}" >> $GITHUB_OUTPUT
240+
241+ - name : Test frontend image with ${{ matrix.environment }} environment
242+ run : |
243+ # Pull the image by digest
244+ docker pull ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }}
245+
246+ # Tag it for easier reference
247+ docker tag ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }} test-frontend:${{ matrix.environment }}
248+
249+ # Run the test script
250+ ./.github/scripts/docker/test-frontend-docker.sh test-frontend:${{ matrix.environment }} ${{ matrix.environment }}
251+
252252 # Test Docker image build-info
253253 test-docker-build-info :
254254 runs-on : ubuntu-latest
0 commit comments