zkboost support mock zkvm (#35) #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build images | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '*' | |
| pull_request: | |
| jobs: | |
| build-images: | |
| outputs: | |
| version: ${{ steps.meta.outputs.version }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: | |
| - amd64 | |
| - arm64 | |
| image: | |
| - execution-witness-sentry | |
| - zkboost-server | |
| include: | |
| - arch: amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository }}/${{ matrix.image }} | |
| tags: | | |
| type=sha,prefix=,format=short,enable=${{ github.ref == 'refs/heads/master' || github.event_name == 'pull_request' }} | |
| type=semver,pattern={{version}} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build ${{ matrix.image }} image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.${{ matrix.image }} | |
| push: ${{ github.event_name == 'push' }} | |
| platforms: linux/${{ matrix.arch }} | |
| tags: ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ steps.meta.outputs.version }}-${{ matrix.arch }} | |
| cache-from: type=gha,scope=${{ matrix.image }}-${{ matrix.arch }} | |
| cache-to: type=gha,mode=max,scope=${{ matrix.image }}-${{ matrix.arch }} | |
| merge-manifests: | |
| permissions: | |
| contents: read | |
| packages: write | |
| needs: build-images | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| strategy: | |
| matrix: | |
| image: | |
| - execution-witness-sentry | |
| - zkboost-server | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create and push multi-arch manifest | |
| run: | | |
| docker buildx imagetools create -t ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ needs.build-images.outputs.version }} \ | |
| ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ needs.build-images.outputs.version }}-amd64 \ | |
| ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ needs.build-images.outputs.version }}-arm64 | |
| - name: Tag latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| docker buildx imagetools create -t ghcr.io/${{ github.repository }}/${{ matrix.image }}:latest \ | |
| ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ needs.build-images.outputs.version }} |