Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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?

flashbots/orderflow-proxy-receiver
tags: |
type=sha
type=semver,pattern={{version}}
Expand All @@ -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
Expand All @@ -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/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
Expand Down