starknet_api,apollo_starknet_os_program: compute OS config hash with … #81
Workflow file for this run
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: Starknet-Transaction-Prover-Docker-Publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| - "APOLLO-*" | |
| - "PRIVACY-*" | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE: ghcr.io/starkware-libs/starknet-privacy/transaction-prover | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: linux/amd64 | |
| runner: namespace-profile-small-ubuntu-24-04-amd64 | |
| target_cpu: znver5 | |
| - platform: linux/arm64 | |
| runner: namespace-profile-small-ubuntu-24-04-arm64 | |
| target_cpu: neoverse-v2 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| tags: | | |
| # Tag-based releases | |
| type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') && 'true' || 'false' }},value={{tag}} | |
| type=semver,pattern={{raw}} | |
| # Testing: for workflow dispatch debugging | |
| type=raw,value=test-{{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} | |
| - uses: docker/build-push-action@v7 | |
| id: build | |
| with: | |
| context: . | |
| file: crates/starknet_transaction_prover/Dockerfile | |
| platforms: ${{ matrix.platform }} | |
| build-args: | | |
| TARGET_CPU=${{ matrix.target_cpu }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| outputs: type=image,"name=${{ env.IMAGE }}",push-by-digest=true,name-canonical=true,push=true | |
| - run: | | |
| mkdir -p /tmp/digests | |
| digest="${{ steps.build.outputs.digest }}" | |
| touch "/tmp/digests/${digest#sha256:}" | |
| shell: bash | |
| - uses: namespace-actions/upload-artifact@v1 | |
| with: | |
| name: digest-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }} | |
| path: /tmp/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| merge: | |
| name: Merge manifests | |
| runs-on: namespace-profile-small-ubuntu-24-04-amd64 | |
| needs: build | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| tags: | | |
| # Tag-based releases | |
| type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') && 'true' || 'false' }},value={{tag}} | |
| type=semver,pattern={{raw}} | |
| # Testing: for workflow dispatch debugging | |
| type=raw,value=test-{{sha}},enable=${{ github.event_name == 'workflow_dispatch' }} | |
| - uses: namespace-actions/download-artifact@v2 | |
| with: | |
| path: /tmp/digests | |
| pattern: digest-* | |
| merge-multiple: true | |
| - name: Create multi-arch manifest | |
| run: | | |
| cd /tmp/digests | |
| tags=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< '${{ steps.meta.outputs.json }}') | |
| if [ -z "$tags" ]; then | |
| echo "No tags were generated by docker/metadata-action; refusing to publish an untagged manifest." | |
| exit 1 | |
| fi | |
| sources=$(printf '${{ env.IMAGE }}@sha256:%s ' *) | |
| docker buildx imagetools create $tags $sources | |
| shell: bash |