Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
with:
build-args: |
VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
output: image
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ COPY . .
# Architecture and OS are set dynamically (by BuildKit)
ARG TARGETOS
ARG TARGETARCH
ARG VERSION=dev
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN go build -o anonymousoverflow && go build -o healthcheck ./src/healthcheck
RUN go build -ldflags="-X anonymousoverflow/config.Version=${VERSION#v}" -o anonymousoverflow && go build -o healthcheck ./src/healthcheck

FROM scratch

Expand Down
2 changes: 1 addition & 1 deletion config/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package config

var Version = "1.13.0"
var Version = "dev"