mirror of
https://github.com/airlabspl/uptimemonitor.git
synced 2025-08-14 04:09:15 +02:00
fix
This commit is contained in:
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@@ -20,6 +20,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Get version from Git
|
||||
id: version
|
||||
run: echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||
with:
|
||||
@@ -41,6 +45,8 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v2
|
||||
|
@@ -8,7 +8,7 @@ RUN go mod download
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
go build -o uptimemonitor \
|
||||
-ldflags "-X uptimemonitor/pkg/version.Version=$(git describe --tags)" \
|
||||
-ldflags "-X uptimemonitor/pkg/version.Version=${VERSION:-$(git describe --tags)}" \
|
||||
./cmd/uptimemonitor
|
||||
|
||||
FROM alpine:latest
|
||||
|
Reference in New Issue
Block a user