mirror of
https://github.com/airlabspl/uptimemonitor.git
synced 2025-08-16 13:19:14 +02:00
Compare commits
5 Commits
v0.1.0-alp
...
v0.1.5-alp
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3899e761f2 | ||
![]() |
34336b2de6 | ||
![]() |
95f197ff60 | ||
![]() |
8ad520c1fe | ||
![]() |
b2d535d885 |
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: Docker
|
||||
|
||||
on: push
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
@@ -14,6 +16,13 @@ jobs:
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
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
|
||||
@@ -36,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