-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Add dockerhub image for orderflow proxy sender #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,9 @@ jobs: | |
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-receiver | ||
images: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-receiver | ||
flashbots/tdx-orderflow-proxy-receiver | ||
|
||
tags: | | ||
type=sha | ||
type=semver,pattern={{version}} | ||
|
@@ -61,6 +63,12 @@ jobs: | |
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.FLASHBOTS_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.FLASHBOTS_DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and Push with Kaniko | ||
run: | | ||
mkdir -p /home/runner/.docker | ||
|
@@ -79,9 +87,66 @@ jobs: | |
--destination ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-receiver:${{ steps.meta.outputs.version }} \ | ||
${{ steps.meta.outputs.tags }} | ||
|
||
build-sender-image: | ||
name: Build Sender Docker Image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Extract metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-sender | ||
flashbots/tdx-orderflow-proxy-sender | ||
tags: | | ||
type=sha | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,value=latest | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.FLASHBOTS_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.FLASHBOTS_DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and Push with Kaniko | ||
run: | | ||
mkdir -p /home/runner/.docker | ||
|
||
echo '{"auths":{"${{ env.REGISTRY }}":{"auth":"'$(echo -n "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" | base64)'"}}}'> /home/runner/.docker/config.json | ||
|
||
docker run \ | ||
-v ${{ github.workspace }}:/workspace \ | ||
-v /home/runner/.docker/config.json:/kaniko/.docker/config.json \ | ||
${{ env.KANIKO_VERSION }} \ | ||
--context /workspace \ | ||
--dockerfile /workspace/Dockerfile \ | ||
--reproducible \ | ||
--cache=true \ | ||
--cache-repo ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-cache \ | ||
--destination ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-sender:${{ steps.meta.outputs.version }} \ | ||
${{ steps.meta.outputs.tags }} | ||
|
||
github-release: | ||
runs-on: ubuntu-latest | ||
needs: [build-binary, build-receiver-image] | ||
needs: [build-binary, build-receiver-image, build-sender-image] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think GHCR only allows images for the specific repo name, but not if they have such a suffix (which is also why the release CI step failed last time). Maybe we only push to Docker Hub?
Or a single image that can be used for both sender and receiver?