From 2ff4804317648031428ac1ce97644fbe2d869434 Mon Sep 17 00:00:00 2001 From: avalonche Date: Sat, 24 Aug 2024 13:35:29 +1000 Subject: [PATCH 1/4] Docker build for op-node --- .github/workflows/release-flashbots.yml | 80 +++++++++++++++++++++++++ pbs/README.md | 2 - 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release-flashbots.yml diff --git a/.github/workflows/release-flashbots.yml b/.github/workflows/release-flashbots.yml new file mode 100644 index 000000000000..bbd4351d9eb7 --- /dev/null +++ b/.github/workflows/release-flashbots.yml @@ -0,0 +1,80 @@ +name: Release + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + docker-image: + name: Publish Docker Image + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Get tag version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Print version + run: | + echo $RELEASE_VERSION + echo ${{ env.RELEASE_VERSION }} + + - name: Extract metadata (tags, labels) for Docker images + id: meta + uses: docker/metadata-action@v4 + with: + images: flashbots/op-node + tags: | + type=sha + type=pep440,pattern={{version}} + type=pep440,pattern={{major}}.{{minor}} + type=raw,value=latest,enable=${{ !contains(env.RELEASE_VERSION, '-') }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.FLASHBOTS_DOCKERHUB_USERNAME }} + password: ${{ secrets.FLASHBOTS_DOCKERHUB_TOKEN }} + + - name: Build and push + run: | + GIT_COMMIT=$(git rev-parse HEAD) \ + GIT_DATE=$(git show -s --format='%ct') \ + IMAGE_TAGS=$(git rev-parse HEAD),latest,${{ steps.meta.outputs.tags }} \ + DOCKER_LABELS=${{ steps.meta.outputs.labels }} \ + VERSION=${{ env.RELEASE_VERSION }} + docker buildx bake \ + --progress plain \ + --push \ + -f docker-bake.hcl \ + op-node + + github-release: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: true + prerelease: false diff --git a/pbs/README.md b/pbs/README.md index 97ed9406bfaa..531c99000dba 100644 --- a/pbs/README.md +++ b/pbs/README.md @@ -36,8 +36,6 @@ $ BUILDER_IMAGE= DEVNET_BUILDER=true make devnet-up These are the configuration options to enable PBS for the devnet. -Here is the prettified Markdown with fixed indents: - ### Sequencer There are three flags that configure the sequencer to request payloads from the builder API endpoint: From 12a5e765dac1a06bdad9144557e0a30087edf47d Mon Sep 17 00:00:00 2001 From: shana Date: Tue, 27 Aug 2024 13:00:48 +1000 Subject: [PATCH 2/4] Update release-flashbots.yml --- .github/workflows/release-flashbots.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-flashbots.yml b/.github/workflows/release-flashbots.yml index bbd4351d9eb7..6d51dba62f13 100644 --- a/.github/workflows/release-flashbots.yml +++ b/.github/workflows/release-flashbots.yml @@ -55,7 +55,7 @@ jobs: GIT_DATE=$(git show -s --format='%ct') \ IMAGE_TAGS=$(git rev-parse HEAD),latest,${{ steps.meta.outputs.tags }} \ DOCKER_LABELS=${{ steps.meta.outputs.labels }} \ - VERSION=${{ env.RELEASE_VERSION }} + VERSION=${{ env.RELEASE_VERSION }} \ docker buildx bake \ --progress plain \ --push \ From 63ef5238207f71694debeb095b0be609a5a1708b Mon Sep 17 00:00:00 2001 From: avalonche Date: Tue, 27 Aug 2024 13:23:56 +1000 Subject: [PATCH 3/4] add env --- .github/workflows/release-flashbots.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-flashbots.yml b/.github/workflows/release-flashbots.yml index 6d51dba62f13..f0649544032b 100644 --- a/.github/workflows/release-flashbots.yml +++ b/.github/workflows/release-flashbots.yml @@ -50,12 +50,13 @@ jobs: password: ${{ secrets.FLASHBOTS_DOCKERHUB_TOKEN }} - name: Build and push + env: + GIT_COMMIT: ${{ github.sha }} + GIT_DATE: ${{ github.event.head_commit.timestamp }} + IMAGE_TAGS: ${{ github.sha }},latest,${{ steps.meta.outputs.tags }} + DOCKER_LABELS: ${{ steps.meta.outputs.labels }} + VERSION: ${{ env.RELEASE_VERSION }} run: | - GIT_COMMIT=$(git rev-parse HEAD) \ - GIT_DATE=$(git show -s --format='%ct') \ - IMAGE_TAGS=$(git rev-parse HEAD),latest,${{ steps.meta.outputs.tags }} \ - DOCKER_LABELS=${{ steps.meta.outputs.labels }} \ - VERSION=${{ env.RELEASE_VERSION }} \ docker buildx bake \ --progress plain \ --push \ From 5263d1eb13570633a58f4a3dc6efd1185deb4a71 Mon Sep 17 00:00:00 2001 From: avalonche Date: Tue, 27 Aug 2024 13:30:37 +1000 Subject: [PATCH 4/4] use dockerfile --- .github/workflows/release-flashbots.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-flashbots.yml b/.github/workflows/release-flashbots.yml index f0649544032b..3bc6ef91f70b 100644 --- a/.github/workflows/release-flashbots.yml +++ b/.github/workflows/release-flashbots.yml @@ -50,18 +50,19 @@ jobs: password: ${{ secrets.FLASHBOTS_DOCKERHUB_TOKEN }} - name: Build and push - env: - GIT_COMMIT: ${{ github.sha }} - GIT_DATE: ${{ github.event.head_commit.timestamp }} - IMAGE_TAGS: ${{ github.sha }},latest,${{ steps.meta.outputs.tags }} - DOCKER_LABELS: ${{ steps.meta.outputs.labels }} - VERSION: ${{ env.RELEASE_VERSION }} - run: | - docker buildx bake \ - --progress plain \ - --push \ - -f docker-bake.hcl \ - op-node + uses: docker/build-push-action@v3 + with: + context: . + file: ops/docker/op-stack-go/Dockerfile + push: true + target: op-node-target + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + GIT_COMMIT=${{ github.sha }} + GIT_DATE=${{ github.event.head_commit.timestamp }} + OP_NODE_VERSION=${{ env.RELEASE_VERSION }} github-release: runs-on: ubuntu-latest