Skip to content

Commit

Permalink
fix docker build process to include commit hash in --version, build:all
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Dec 13, 2023
1 parent 3194fbc commit 920366d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile.nitro
build-args: |
VERSION=${{ github.event.ref }}
CHAIN_VERSION=${{ env.VERSION }}
SF_VERSION=${{ env.SF_VERSION }}
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ RUN go mod download

COPY . ./

# to get buildinfo in golang
RUN apk add git
ARG VERSION="dev"
RUN go build -v -ldflags "-X main.version=${VERSION}" ./cmd/fireeth

Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.nitro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ WORKDIR /work
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get -y install -y git

ARG VERSION=dev
RUN go build -v -ldflags "-X main.version=${VERSION}" ./cmd/fireeth

Expand Down

0 comments on commit 920366d

Please sign in to comment.