Update main-branch.yml
This commit is contained in:
parent
37192b0c40
commit
7246d8fc5e
1 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,22 @@
|
||||||
|
build-test-linux-amd64:
|
||||||
|
image: golang:latest
|
||||||
|
stage: build-binary
|
||||||
|
variables:
|
||||||
|
GOOS: "linux"
|
||||||
|
GOARCH: "amd64"
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
before_script:
|
||||||
|
- go get -d -v ./...
|
||||||
|
- apt install curl -y
|
||||||
|
script:
|
||||||
|
- go build -a -installsuffix cgo -ldflags="-X $I_PACKAGE.CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA -X $I_PACKAGE.CI_COMMIT_BRANCH=$CI_COMMIT_BRANCH -X $I_PACKAGE.CI_COMMIT_TAG=$CI_COMMIT_TAG" -o linux-amd64 .
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- linux-amd64
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
docker-build-prod-latest:
|
docker-build-prod-latest:
|
||||||
image: ezkrg/buildx
|
image: ezkrg/buildx
|
||||||
stage: build-docker
|
stage: build-docker
|
||||||
|
|
Loading…
Reference in a new issue