From c983b29b72894f13a85575ccca11c25fb8c747a7 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Wed, 1 Oct 2025 14:16:13 +0200 Subject: [PATCH] CI/docker: fix the job order --- .github/workflows/docker.yaml | 96 +++++++++++++++++------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 2b2529ec5..8031bad23 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -126,59 +126,12 @@ jobs: if-no-files-found: error retention-days: 1 - # Test frontend image with all environment configurations - test-frontend-image: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release') - needs: - - build-mina-frontend-image - strategy: - matrix: - environment: [local, webnode, production, development, producer, fuzzing] - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Download frontend digest artifacts - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: frontend-*-digests-* - merge-multiple: true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Get image digest - id: digest - run: | - # Get the first digest from artifacts (we'll test with amd64) - DIGEST=$(ls /tmp/digests | head -1) - echo "digest=sha256:${DIGEST}" >> $GITHUB_OUTPUT - - - name: Test frontend image with ${{ matrix.environment }} environment - run: | - # Pull the image by digest - docker pull ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }} - - # Tag it for easier reference - docker tag ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }} test-frontend:${{ matrix.environment }} - - # Run the test script - ./.github/scripts/docker/test-frontend-docker.sh test-frontend:${{ matrix.environment }} ${{ matrix.environment }} - # Push frontend multi-arch manifest push-frontend-image: runs-on: ubuntu-latest if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release') needs: - - test-frontend-image + - build-mina-frontend-image steps: - name: Git checkout uses: actions/checkout@v5 @@ -249,6 +202,53 @@ jobs: dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} additional_tags: ${{ env.ADDITIONAL_TAGS }} + # Test frontend image with all environment configurations + test-frontend-image: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release') + needs: + - push-frontend-image + strategy: + matrix: + environment: [local, webnode, production, development, producer, fuzzing] + steps: + - name: Git checkout + uses: actions/checkout@v5 + + - name: Download frontend digest artifacts + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: frontend-*-digests-* + merge-multiple: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Get image digest + id: digest + run: | + # Get the first digest from artifacts (we'll test with amd64) + DIGEST=$(ls /tmp/digests | head -1) + echo "digest=sha256:${DIGEST}" >> $GITHUB_OUTPUT + + - name: Test frontend image with ${{ matrix.environment }} environment + run: | + # Pull the image by digest + docker pull ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }} + + # Tag it for easier reference + docker tag ${{ env.REGISTRY_FRONTEND_IMAGE }}@${{ steps.digest.outputs.digest }} test-frontend:${{ matrix.environment }} + + # Run the test script + ./.github/scripts/docker/test-frontend-docker.sh test-frontend:${{ matrix.environment }} ${{ matrix.environment }} + # Test Docker image build-info test-docker-build-info: runs-on: ubuntu-latest