diff --git a/.github/workflows/taiko-client--docker-build.yml b/.github/workflows/taiko-client--docker-build.yml new file mode 100644 index 00000000000..5a4b05034a5 --- /dev/null +++ b/.github/workflows/taiko-client--docker-build.yml @@ -0,0 +1,65 @@ +name: "Nethermind - Docker build and push" + +on: + workflow_dispatch: + push: + branches: [main] + tags: + - "taiko-client-v*" + paths: + - "packages/taiko-client/**" + +env: + DOCKER_REGISTRY: nethermind.jfrog.io + DOCKER_REPOSITORY: core-oci-local-dev/taiko-client + +jobs: + build: + name: Build and push docker image + runs-on: ubuntu-latest + if: github.repository == 'NethermindEth/surge-taiko-mono' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ secrets.ARTIFACTORY_CORE_USERNAME }} + password: ${{ secrets.ARTIFACTORY_CORE_TOKEN_CONTRIBUTOR }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REPOSITORY }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=ref,event=tag + type=sha + + - name: Build and push by digest + id: build + uses: docker/build-push-action@v5 + with: + platforms: linux/amd64,linux/arm64 + context: . + file: packages/taiko-client/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Summary + run: | + echo "## Docker build completed :green_circle:" >> $GITHUB_STEP_SUMMARY + echo "### Tags" >> $GITHUB_STEP_SUMMARY + echo "${{ steps.meta.outputs.tags }}" | while IFS= read -r TAG; do + echo "- $TAG" >> $GITHUB_STEP_SUMMARY + done diff --git a/packages/taiko-client/Dockerfile b/packages/taiko-client/Dockerfile index a697627cfe5..79da779e395 100644 --- a/packages/taiko-client/Dockerfile +++ b/packages/taiko-client/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23-alpine as builder +FROM golang:1.23-alpine AS builder RUN apk update && apk add --no-cache --update gcc musl-dev linux-headers git make build-base