Skip to content
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

Build image wf #1

Merged
merged 4 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
59 changes: 59 additions & 0 deletions .github/workflows/build_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
on:
workflow_dispatch:
push:
branches:
- gsora/metrics
name: Build and Publish Docker Image
jobs:
build-docker:
runs-on: ubuntu-latest
name: Build Docker Image
steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
fetch-depth: 0
submodules: 'recursive'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- uses: docker/setup-buildx-action@v2
with:
driver-opts: "image=moby/buildkit:v0.10.5" # avoid unknown/unknown arch in ghcr

- name: Define docker image meta data tags
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/obolnetwork/mev-boost
tags: |
# Tag "git short sha" on all git events
type=sha,prefix=

# Tag "next" on git-push-to-main-branch events
type=raw,value=next,event=branch,enable={{is_default_branch}}

# Tag "latest" on git-tag events
type=raw,value=latest,event=tag

# Tag "tag ref" on git-tag events
type=ref,event=tag

- name: Login to Github container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
GITHUB_SHA=${{ github.sha }}
GO_BUILD_FLAG=${{ env.GO_BUILD_FLAG }}
tags: ${{ steps.meta.outputs.tags }}
2 changes: 1 addition & 1 deletion config/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

var (
// Version is set at build time (must be a var, not a const!)
Version = "v1.7.1"
Version = "v1.8-dev"
LukeHackett12 marked this conversation as resolved.
Show resolved Hide resolved

// RFC3339Milli is a time format string based on time.RFC3339 but with millisecond precision
RFC3339Milli = "2006-01-02T15:04:05.999Z07:00"
Expand Down
Loading