Skip to content

feat(op-reth): add StreamingFast Docker image build + release workflow#1

Merged
maoueh merged 4 commits into
feature/update-to-latest-op-rethfrom
feature/docker-image-building
Jun 11, 2026
Merged

feat(op-reth): add StreamingFast Docker image build + release workflow#1
maoueh merged 4 commits into
feature/update-to-latest-op-rethfrom
feature/docker-image-building

Conversation

@maoueh

@maoueh maoueh commented Jun 11, 2026

Copy link
Copy Markdown

Summary

Adds a StreamingFast-flavored Docker image build + push + release flow for op-reth, modeled on the near-identical flows in streamingfast/base and streamingfast/go-ethereum. All additions live in .sf-suffixed files separate from upstream — no existing upstream CI/Dockerfile/workflow is modified, so upstream merges stay clean.

Files added

  • .github/workflows/sf-release.ymlbuild + release jobs. Triggers on *-fh* tags and workflow_dispatch only (no PR/branch triggers, so no collision with upstream CI). build publishes a linux/amd64 image to ghcr.io from Dockerfile.sf; on tag, release docker cps the op-reth binary out, pulls release notes from CHANGELOG.sf.md via sfreleaser (v0.12.1), and publishes a GitHub release (softprops/action-gh-release@v2) with the binary attached.
  • rust/op-reth/Dockerfile.sf — SF variant tracking op-reth/DockerfileOp (cargo-chef, rust 1.94, wolfi-base runtime, --bin op-reth --manifest-path /app/op-reth/bin/Cargo.toml, profile maxperf). Adds ARG VERSION (stamped as OCI label) and installs the binary at /usr/local/bin/op-reth. Build context is rust/, matching the upstream docker-bake op-reth target.
  • CHANGELOG.sf.md — Keep-a-Changelog seed read by the release job.

Decisions

  • amd64-only. op-reth is a full node built maxperf (fat LTO, codegen-units=1) — far heavier than base's slim base-reth-node. A native arm64 runner risks CI timeouts, so the matrix + manifest-merge job is dropped. Reversible — see the comment in the workflow.
  • VERSION = OCI label only. reth derives its --version from upstream git metadata via a vergen build script in an external dependency; there's no clean in-tree override, so the tag is recorded as a label rather than faked into the binary.
  • Binary name/path verified against bin/Cargo.toml and the upstream bake target, not assumed.

Testing

No Rust source changed (CI YAML + Dockerfile + changelog only). Workflow YAML validated; Dockerfile.sf is a faithful copy of the proven upstream DockerfileOp with additive deltas only. The full maxperf image build is hours-long and was not run locally.

Add a StreamingFast-flavored Docker build/push/release flow for op-reth,
kept in .sf-suffixed files separate from upstream so upstream merges stay
clean. No existing upstream CI/Dockerfile is modified.

- .github/workflows/sf-release.yml: build + release jobs triggered on
  `*-fh*` tags and manual dispatch. Builds a linux/amd64 ghcr image from
  Dockerfile.sf, then (on tag) extracts the op-reth binary, pulls release
  notes from CHANGELOG.sf.md via sfreleaser, and publishes a GitHub release.
- rust/op-reth/Dockerfile.sf: SF variant tracking op-reth/DockerfileOp,
  adds ARG VERSION (OCI label) and installs op-reth at /usr/local/bin.
- CHANGELOG.sf.md: Keep-a-Changelog seed read by the release job.

amd64-only for now: op-reth's maxperf full-node build is too heavy to
reliably build on GitHub-hosted arm64 runners.
--github-output="changelog:$GITHUB_OUTPUT"

- name: Release
uses: softprops/action-gh-release@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Apply suggestion

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Ignore, incorrect.

The full job is actually already gated, no need to gate again if: startsWith(github.ref, 'refs/tags/') see line 86

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in a5bfbc3: added if: github.ref_type == 'tag' on the Release step in .github/workflows/sf-release.yml.

…versions

- Run on `firehose/*` branch pushes and pull requests in addition to
  `*-fh*` tags and manual dispatch.
- Skip ghcr login/push for fork PRs (read-only token); same-repo PRs and
  pushes still authenticate and push. The image always builds to validate
  the Dockerfile.
- Bump both jobs to ubuntu-24.04.
- Treat `-alpha` like `-beta`/`-rc` for `latest` exclusion and prerelease.
- Restore the version-suffixed `<sha>-<version>` tag (race-safe when a tag
  and its branch build the same commit) and sanitize `/` -> `-` in the
  extracted version so slash-containing refs stay valid Docker tags.
@maoueh maoueh merged commit d08597e into feature/update-to-latest-op-reth Jun 11, 2026
2 checks passed
@maoueh maoueh deleted the feature/docker-image-building branch June 11, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants