Commit 3f563420 authored by Ben Wilson's avatar Ben Wilson

Renamed op-exporter and added CI

parent c5a8db93
---
'@eth-optimism/op-exporter': patch
---
Cleanup op-exporter CI, renamed package
...@@ -27,6 +27,7 @@ jobs: ...@@ -27,6 +27,7 @@ jobs:
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 }}
rpc-proxy : ${{ steps.packages.outputs.rpc-proxy }} rpc-proxy : ${{ steps.packages.outputs.rpc-proxy }}
op-exporter : ${{ steps.packages.outputs.op-exporter }}
steps: steps:
- name: Check out source code - name: Check out source code
...@@ -405,6 +406,43 @@ jobs: ...@@ -405,6 +406,43 @@ jobs:
GITCOMMIT=${{ steps.build_args.outputs.GITCOMMIT }} GITCOMMIT=${{ steps.build_args.outputs.GITCOMMIT }}
GITVERSION=${{ steps.build_args.outputs.GITVERSION }} GITVERSION=${{ steps.build_args.outputs.GITVERSION }}
op-exporter:
name: Publish op-exporter Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs: canary-publish
if: needs.canary-publish.outputs.op-exporter != ''
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: Set build args
id: build_args
run: |
echo ::set-output name=GITDATE::"$(date +%d-%m-%Y)"
echo ::set-output name=GITVERSION::$(jq -r .version ./go/op-exporter/package.json)
echo ::set-output name=GITCOMMIT::"$GITHUB_SHA"
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./ops/docker/Dockerfile.op-exporter
push: true
tags: ethereumoptimism/op-exporter:${{ needs.canary-publish.outputs.op-exporter }}
build-args: |
GITDATE=${{ steps.build_args.outputs.GITDATE }}
GITCOMMIT=${{ steps.build_args.outputs.GITCOMMIT }}
GITVERSION=${{ steps.build_args.outputs.GITVERSION }}
rpc-proxy: rpc-proxy:
name: Publish rpc-proxy Version ${{ needs.canary-publish.outputs.canary-docker-tag }} name: Publish rpc-proxy Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
needs: canary-publish needs: canary-publish
......
module github.com/ethereum-optimism/optimism/go/op_exporter module github.com/ethereum-optimism/optimism/go/op-exporter
go 1.16 go 1.16
......
{
"name": "@eth-optimism/op-exporter",
"version": "0.5.0",
"private": true,
"devDependencies": {}
}
FROM golang:1.16 as builder FROM golang:1.16 as builder
ADD ./go/op_exporter /app/ ADD ./go/op-exporter /app/
WORKDIR /app/ WORKDIR /app/
RUN make build RUN make build
FROM alpine:latest FROM alpine:latest
RUN apk --no-cache add ca-certificates RUN apk --no-cache add ca-certificates
WORKDIR /root/ WORKDIR /root/
COPY --from=builder /app/op_exporter /usr/local/bin/ COPY --from=builder /app/op-exporter /usr/local/bin/
ENTRYPOINT ["op_exporter"] ENTRYPOINT ["op-exporter"]
CMD ["--help"] CMD ["--help"]
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"go/gas-oracle", "go/gas-oracle",
"go/batch-submitter", "go/batch-submitter",
"go/proxyd", "go/proxyd",
"go/op-exporter",
"ops/docker/rpc-proxy", "ops/docker/rpc-proxy",
"ops/docker/hardhat" "ops/docker/hardhat"
], ],
......
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