feat: use bstream fork with Starknet patch #50
Workflow file for this run
This file contains 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 multi-arch images" | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
image-info: | |
name: "Extract crate info" | |
runs-on: "ubuntu-latest" | |
outputs: | |
version: ${{ steps.derive.outputs.version }} | |
steps: | |
- id: "derive" | |
name: "Derive image info from Git tag" | |
run: | | |
FULL_REF="${{ github.ref }}" | |
REGEX="^refs\/tags\/v(.*)$" | |
[[ $FULL_REF =~ $REGEX ]]; | |
echo "version=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT | |
build-amd64: | |
name: "Build for linux/amd64" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "image-info" | |
env: | |
DOCKER_REPOSITORY: "starknet/firestark" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Login to Docker Hub" | |
uses: "docker/[email protected]" | |
with: | |
username: "${{ secrets.DOCKER_HUB_USERNAME }}" | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: "Build Docker image" | |
run: | | |
docker build -t ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-amd64 --build-arg VERSION=${{ needs.image-info.outputs.version }} -f ./Dockerfile . | |
- name: "Push Docker image" | |
run: | | |
docker push ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-amd64 | |
build-arm64: | |
name: "Build for linux/arm64" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "image-info" | |
env: | |
DOCKER_REPOSITORY: "starknet/firestark" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Login to Docker Hub" | |
uses: "docker/[email protected]" | |
with: | |
username: "${{ secrets.DOCKER_HUB_USERNAME }}" | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: "Build Docker image" | |
run: | | |
docker build -t ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-arm64 --build-arg VERSION=${{ needs.image-info.outputs.version }} -f ./docker/Dockerfile.cross.arm64 . | |
- name: "Push Docker image" | |
run: | | |
docker push ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-arm64 | |
push: | |
name: "Push multi-arch manifest" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "build-amd64" | |
- "build-arm64" | |
- "image-info" | |
env: | |
DOCKER_REPOSITORY: "starknet/firestark" | |
steps: | |
- name: "Login to Docker Hub" | |
uses: "docker/[email protected]" | |
with: | |
username: "${{ secrets.DOCKER_HUB_USERNAME }}" | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: "Pull Docker images" | |
run: | | |
docker pull ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-amd64 | |
docker pull ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-arm64 | |
- name: "Push Docker image" | |
run: | | |
docker manifest create ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }} \ | |
${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-amd64 \ | |
${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-arm64 | |
docker manifest create ${DOCKER_REPOSITORY}:latest \ | |
${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-amd64 \ | |
${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }}-arm64 | |
docker manifest push ${DOCKER_REPOSITORY}:${{ needs.image-info.outputs.version }} | |
docker manifest push ${DOCKER_REPOSITORY}:latest |