Commit 6e6a55b1 authored by Ben Wilson's avatar Ben Wilson

Bump proxyd to build

Update canary to build proxyd and rpc-proxy
fixed "runs-on" value
fixing env step
Update docker build context
Added env back to action
parent e70e762b
---
'@eth-optimism/proxyd': patch
---
Canary release
......@@ -23,8 +23,8 @@ jobs:
contracts: ${{ steps.packages.outputs.contracts }}
replica-healthcheck: ${{ steps.packages.outputs.replica-healthcheck }}
canary-docker-tag: ${{ steps.docker-image-name.outputs.canary-docker-tag }}
proxyd: ${{ steps.canary-publish.outputs.proxyd }}
rpc-proxy : ${{ steps.canary-publish.outputs.rpc-proxy }}
proxyd: ${{ steps.packages.outputs.proxyd }}
rpc-proxy : ${{ steps.packages.outputs.rpc-proxy }}
steps:
- name: Check out source code
......@@ -315,7 +315,7 @@ jobs:
name: Publish proxyd Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs: canary-publish
if: needs.canary-publish.outputs.proxyd != ''
runs-on: ubuntu:latest
runs-on: ubuntu-latest
steps:
- name: Checkout
......@@ -329,26 +329,30 @@ jobs:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Set env
- name: Set build args
id: build_args
run: |
echo "GITDATE=$(date)" >> $GITHUB_ENV"
echo ::set-output name=GITDATE::"$(date +%d-%m-%Y)"
echo ::set-output name=GITVERSION::$(jq -r .version ./go/proxyd/package.json)
echo ::set-output name=GITCOMMIT::"$GITHUB_SHA"
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./go/proxyd
file: ./Dockerfile
context: .
file: ./go/proxyd/Dockerfile
push: true
tags: ethereumoptimism/proxyd:${{ needs.canary-publish.outputs.proxyd }}
build-args: |
GITCOMMIT=$GITHUB_SHA
GITDATE=$GITDATE
GITDATE=${{ steps.build_args.outputs.GITDATE }}
GITCOMMIT=${{ steps.build_args.outputs.GITCOMMIT }}
GITVERSION=${{ steps.build_args.outputs.GITVERSION }}
rpc-proxy:
name: Publish rpc-proxy Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs: canary-publish
if: needs.canary-publish.outputs.rpc-proxy != ''
runs-on: ubuntu:latest
runs-on: ubuntu-latest
steps:
- name: Checkout
......
FROM golang:1.17.2-alpine3.14 AS builder
FROM golang:1.17.2-alpine3.13 AS builder
ARG GITCOMMIT=docker
ARG GITDATE=docker
ARG GITVERSION=docker
RUN apk add make jq && \
mkdir -p /app
RUN apk add make jq git
WORKDIR /app
COPY go.mod /app
COPY go.sum /app
COPY cmd /app/cmd
COPY *.go /app/
COPY package.json /app
COPY Makefile /app
COPY ./go/proxyd /app
RUN make proxyd GITCOMMIT=$GITCOMMIT GITDATE=$GITDATE
RUN make proxyd
FROM alpine:3.14.2
EXPOSE 8080
VOLUME /etc/proxyd.toml
VOLUME /etc/proxyd
COPY --from=builder /app/bin/proxyd /bin/proxyd
CMD ["/bin/proxyd", "/etc/proxyd.toml"]
CMD ["/bin/proxyd", "/etc/proxyd/proxyd.toml"]
GITCOMMIT := $(shell git rev-parse HEAD)
GITDATE := $(shell git show -s --format='%ct')
GITVERSION := $(shell cat package.json | jq .version)
LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT)
LDFLAGSSTRING +=-X main.GitDate=$(GITDATE)
LDFLAGSSTRING +=-X main.GitVersion=$(GITVERSION)
......
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