Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading