Skip to content

Commit

Permalink
chore: add docker image workflow for bsc (#44)
Browse files Browse the repository at this point in the history
* chore: add docker image workflow

* support opbnb docker release
  • Loading branch information
forcodedancing authored Jun 27, 2024
1 parent 613f074 commit 4086c81
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
name: docker

on:
workflow_dispatch: {}
workflow_dispatch: { }
push:
tags:
- v*

env:
REPO_NAME: ${{ github.repository_owner }}/reth
IMAGE_NAME: ${{ github.repository_owner }}/reth
# IMAGE_NAME: ${{ github.repository_owner }}/reth
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth
BSC_IMAGE_NAME: ${{ github.repository_owner }}/bsc-reth
CARGO_TERM_COLOR: always
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/reth
# DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/reth
OP_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/op-reth
BSC_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/bsc-reth
DOCKER_USERNAME: ${{ github.actor }}

jobs:
Expand All @@ -38,15 +40,21 @@ jobs:
run: |
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
docker buildx create --use --name cross-builder
- name: Build and push reth image, tag as "latest"
if: ${{ contains(github.event.ref, 'beta') }}
run: make PROFILE=maxperf docker-build-push-latest
- name: Build and push reth image
if: ${{ ! contains(github.event.ref, 'beta') }}
run: make PROFILE=maxperf docker-build-push
# - name: Build and push reth image, tag as "latest"
# if: ${{ contains(github.event.ref, 'beta') }}
# run: make PROFILE=maxperf docker-build-push-latest
# - name: Build and push reth image
# if: ${{ ! contains(github.event.ref, 'beta') }}
# run: make PROFILE=maxperf docker-build-push
- name: Build and push op-reth image, tag as "latest"
if: ${{ contains(github.event.ref, 'beta') }}
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME PROFILE=maxperf op-docker-build-push-latest
- name: Build and push op-reth image
if: ${{ ! contains(github.event.ref, 'beta') }}
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME PROFILE=maxperf op-docker-build-push
- name: Build and push bsc-reth image, tag as "latest"
if: ${{ contains(github.event.ref, 'beta') }}
run: make IMAGE_NAME=$BSC_IMAGE_NAME DOCKER_IMAGE_NAME=$BSC_DOCKER_IMAGE_NAME PROFILE=maxperf bsc-docker-build-push-latest
- name: Build and push bsc-reth image
if: ${{ ! contains(github.event.ref, 'beta') }}
run: make IMAGE_NAME=$BSC_IMAGE_NAME DOCKER_IMAGE_NAME=$BSC_DOCKER_IMAGE_NAME PROFILE=maxperf bsc-docker-build-push
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ build-native-%:
cargo build --bin reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)"

op-build-native-%:
cargo build --bin op-reth --target $* --features "optimism,$(FEATURES)" --profile "$(PROFILE)"
cargo build --bin op-reth --target $* --features "optimism,opbnb,$(FEATURES)" --profile "$(PROFILE)"

bsc-build-native-%:
cargo build --bin bsc-reth --target $* --features "bsc,$(FEATURES)" --profile "$(PROFILE)"
Expand Down Expand Up @@ -123,7 +123,7 @@ build-%:

op-build-%:
RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" \
cross build --bin op-reth --target $* --features "optimism,$(FEATURES)" --profile "$(PROFILE)"
cross build --bin op-reth --target $* --features "optimism,opbnb,$(FEATURES)" --profile "$(PROFILE)"

bsc-build-%:
RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" \
Expand Down

0 comments on commit 4086c81

Please sign in to comment.