25
25
- name : Install GitVersion
26
26
uses :
gittools/actions/gitversion/[email protected]
27
27
with :
28
- versionSpec : ' 6.1.x '
28
+ versionSpec : ' 6.0.5 '
29
29
- name : Use GitVersion
30
30
id : gitversion # step id used as reference for output values
31
31
uses :
gittools/actions/gitversion/[email protected]
@@ -40,16 +40,16 @@ jobs:
40
40
go build -v -ldflags="
41
41
-w
42
42
-s
43
- -X 'main.Version=v${{ steps.gitversion.outputs.SemVer }}'
43
+ -X 'main.Version=v${{ steps.gitversion.outputs.FullSemVer }}'
44
44
-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 }}'
46
46
-X 'github.com/prometheus/common/version.Revision=${{ steps.gitversion.outputs.VersionSourceSha }}'
47
47
-X 'github.com/prometheus/common/version.Branch=${{ steps.gitversion.outputs.BranchName }}'
48
48
-X 'github.com/prometheus/common/version.BuildDate=$( date '+%F %H-%M-%S' )'"
49
49
50
50
- uses : actions/upload-artifact@v4
51
51
with :
52
- name : docker_service_exporter.${{ steps.gitversion.outputs.SemVer }}
52
+ name : docker_service_exporter.${{ steps.gitversion.outputs.FullSemVer }}
53
53
path : src/docker_service_exporter
54
54
55
55
- name : Docker Build and push
58
58
github-token : ${{ secrets.GITHUB_TOKEN }}
59
59
dockerfile : Dockerfile
60
60
image-name : server
61
- image-tag : ${{ steps.gitversion.outputs.SemVer }}
61
+ image-tag : ${{ steps.gitversion.outputs.FullSemVer }}
62
62
custom-args : |
63
- --build-arg APP_VERSION=${{ steps.gitversion.outputs.SemVer }}
63
+ --build-arg APP_VERSION=${{ steps.gitversion.outputs.FullSemVer }}
64
64
--build-arg APP_REVISION=${{ steps.gitversion.outputs.VersionSourceSha }}
65
65
--build-arg APP_BRANCH=${{ steps.gitversion.outputs.BranchName }}
0 commit comments