Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.4 in /sr… #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Package Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.1 | |
check-latest: true | |
cache-dependency-path: | | |
src/go.sum | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Use GitVersion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Build | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
GOOS: linux | |
GOARCH: amd64 | |
working-directory: src | |
run: | | |
go build -v -ldflags=" | |
-w | |
-s | |
-X 'main.Version=v${{ steps.gitversion.outputs.SemVer }}' | |
-X 'app/build.Time=$( date '+%F %H-%M-%S' )' | |
-X 'github.com/prometheus/common/version.Version=${{ steps.gitversion.outputs.SemVer }}' | |
-X 'github.com/prometheus/common/version.Revision=${{ steps.gitversion.outputs.VersionSourceSha }}' | |
-X 'github.com/prometheus/common/version.Branch=${{ steps.gitversion.outputs.BranchName }}' | |
-X 'github.com/prometheus/common/version.BuildDate=$( date '+%F %H-%M-%S' )'" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docker_service_exporter.${{ steps.gitversion.outputs.SemVer }} | |
path: src/docker_service_exporter | |
- name: Docker Build and push | |
uses: VaultVulp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
dockerfile: Dockerfile | |
image-name: server | |
image-tag: ${{ steps.gitversion.outputs.SemVer }} | |
custom-args: | | |
--build-arg APP_VERSION=${{ steps.gitversion.outputs.SemVer }} | |
--build-arg APP_REVISION=${{ steps.gitversion.outputs.VersionSourceSha }} | |
--build-arg APP_BRANCH=${{ steps.gitversion.outputs.BranchName }} |