Skip to content

Commit

Permalink
Fix build version in Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
christophetd committed Jan 20, 2022
1 parent 1c5040a commit 40da5c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v1.12.0
with:
Expand All @@ -33,6 +34,8 @@ jobs:
with:
context: .
push: true
build-args: |
VERSION=${{ github.ref_name }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
ARG VERSION=dev-snapshot

FROM golang:1.17.6-alpine3.15 AS builder
RUN mkdir /build
RUN apk add --update make
WORKDIR /build
ADD . /build
RUN make
RUN make BUILD_VERSION=${VERSION}

FROM alpine:3.15.0 AS runner
LABEL org.opencontainers.image.source="https://github.com/DataDog/stratus-red-team/"
Expand Down

0 comments on commit 40da5c7

Please sign in to comment.