Commit 5dde6bc6 authored by Mark Tyneway's avatar Mark Tyneway Committed by Kelvin Fichter

ci: publish builder in canary release

Adds the ability to publish the builder as well as the
gas-oracle for the canary releases.
parent 8f4cb337
...@@ -21,6 +21,7 @@ jobs: ...@@ -21,6 +21,7 @@ jobs:
message-relayer: ${{ steps.packages.outputs.message-relayer }} message-relayer: ${{ steps.packages.outputs.message-relayer }}
data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }} data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }}
contracts: ${{ steps.packages.outputs.contracts }} contracts: ${{ steps.packages.outputs.contracts }}
gas-oracle: ${{ steps.packages.outputs.gas-oracle }}
replica-healthcheck: ${{ steps.packages.outputs.replica-healthcheck }} replica-healthcheck: ${{ steps.packages.outputs.replica-healthcheck }}
canary-docker-tag: ${{ steps.docker-image-name.outputs.canary-docker-tag }} canary-docker-tag: ${{ steps.docker-image-name.outputs.canary-docker-tag }}
proxyd: ${{ steps.packages.outputs.proxyd }} proxyd: ${{ steps.packages.outputs.proxyd }}
...@@ -87,7 +88,6 @@ jobs: ...@@ -87,7 +88,6 @@ jobs:
env: env:
CUSTOM_IMAGE_NAME: ${{ github.event.inputs.customImageName }} CUSTOM_IMAGE_NAME: ${{ github.event.inputs.customImageName }}
# The below code is duplicated, would be ideal if we could use a matrix with a # The below code is duplicated, would be ideal if we could use a matrix with a
# key/value being dynamically generated from the `publishedPackages` output # key/value being dynamically generated from the `publishedPackages` output
# while also allowing for parallelization (i.e. `l2geth` not depending on `builder`) # while also allowing for parallelization (i.e. `l2geth` not depending on `builder`)
...@@ -118,11 +118,35 @@ jobs: ...@@ -118,11 +118,35 @@ jobs:
push: true push: true
tags: ethereumoptimism/l2geth:${{ needs.canary-publish.outputs.canary-docker-tag }} tags: ethereumoptimism/l2geth:${{ needs.canary-publish.outputs.canary-docker-tag }}
# pushes the base builder image to dockerhub gas-oracle:
name: Publish Gas Oracle ${{ needs.builder.outputs.canary-docker-tag }}
needs: canary-publish
if: needs.canary-publish.outputs.gas-oracle != ''
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.gas-oracle
push: true
tags: ethereumoptimism/gas-oracle:${{ needs.builder.outputs.canary-docker-tag }}
builder: builder:
name: Prepare the base builder image for the services name: Prepare the base builder image for the services
needs: canary-publish needs: canary-publish
if: needs.canary-publish.outputs.builder == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
# we re-output the variables so that the child jobs can access them # we re-output the variables so that the child jobs can access them
outputs: outputs:
...@@ -134,12 +158,9 @@ jobs: ...@@ -134,12 +158,9 @@ jobs:
replica-healthcheck: ${{ needs.canary-publish.outputs.replica-healthcheck }} replica-healthcheck: ${{ needs.canary-publish.outputs.replica-healthcheck }}
canary-docker-tag: ${{ needs.canary-publish.outputs.canary-docker-tag }} canary-docker-tag: ${{ needs.canary-publish.outputs.canary-docker-tag }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v1 uses: docker/login-action@v1
...@@ -147,13 +168,16 @@ jobs: ...@@ -147,13 +168,16 @@ jobs:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push - name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
file: ./ops/docker/Dockerfile.monorepo file: ./ops/docker/Dockerfile.monorepo
push: true push: true
tags: ethereumoptimism/builder tags: ethereumoptimism/builder:${{ needs.canary-publish.outputs.canary-docker-tag }}
message-relayer: message-relayer:
name: Publish Message Relayer Version ${{ needs.builder.outputs.canary-docker-tag }} name: Publish Message Relayer Version ${{ needs.builder.outputs.canary-docker-tag }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment