Skip to content

Commit b5146b5

Browse files
authored
Fix gitversion (#167)
1 parent ba64d32 commit b5146b5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/nightly-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install GitVersion
2626
uses: gittools/actions/gitversion/[email protected]
2727
with:
28-
versionSpec: '6.1.x'
28+
versionSpec: '6.0.5'
2929
- name: Use GitVersion
3030
id: gitversion # step id used as reference for output values
3131
uses: gittools/actions/gitversion/[email protected]
@@ -40,16 +40,16 @@ jobs:
4040
go build -v -ldflags="
4141
-w
4242
-s
43-
-X 'main.Version=v${{ steps.gitversion.outputs.SemVer }}'
43+
-X 'main.Version=v${{ steps.gitversion.outputs.FullSemVer }}'
4444
-X 'app/build.Time=$( date '+%F %H-%M-%S' )'
45-
-X 'github.com/prometheus/common/version.Version=${{ steps.gitversion.outputs.SemVer }}'
45+
-X 'github.com/prometheus/common/version.Version=${{ steps.gitversion.outputs.FullSemVer }}'
4646
-X 'github.com/prometheus/common/version.Revision=${{ steps.gitversion.outputs.VersionSourceSha }}'
4747
-X 'github.com/prometheus/common/version.Branch=${{ steps.gitversion.outputs.BranchName }}'
4848
-X 'github.com/prometheus/common/version.BuildDate=$( date '+%F %H-%M-%S' )'"
4949
5050
- uses: actions/upload-artifact@v4
5151
with:
52-
name: docker_service_exporter.${{ steps.gitversion.outputs.SemVer }}
52+
name: docker_service_exporter.${{ steps.gitversion.outputs.FullSemVer }}
5353
path: src/docker_service_exporter
5454

5555
- name: Docker Build and push
@@ -58,8 +58,8 @@ jobs:
5858
github-token: ${{ secrets.GITHUB_TOKEN }}
5959
dockerfile: Dockerfile
6060
image-name: server
61-
image-tag: ${{ steps.gitversion.outputs.SemVer }}
61+
image-tag: ${{ steps.gitversion.outputs.FullSemVer }}
6262
custom-args: |
63-
--build-arg APP_VERSION=${{ steps.gitversion.outputs.SemVer }}
63+
--build-arg APP_VERSION=${{ steps.gitversion.outputs.FullSemVer }}
6464
--build-arg APP_REVISION=${{ steps.gitversion.outputs.VersionSourceSha }}
6565
--build-arg APP_BRANCH=${{ steps.gitversion.outputs.BranchName }}

0 commit comments

Comments
 (0)