We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b77d76 commit c70a113Copy full SHA for c70a113
.gitlab-ci.yml
@@ -25,6 +25,14 @@
25
--opt build-arg:VERSION=$1 \
26
--opt build-arg:COMMIT=$CI_COMMIT_SHA \
27
--output type=image,name=$CI_REGISTRY_IMAGE:$1,push=true
28
+
29
+ buildctl-daemonless.sh build \
30
+ --frontend=dockerfile.v0 \
31
+ --local context=. \
32
+ --local dockerfile=. \
33
+ --opt build-arg:VERSION=$1 \
34
+ --opt build-arg:COMMIT=$CI_COMMIT_SHA \
35
+ --output type=image,name=$CI_REGISTRY_IMAGE:latest,push=true
36
}
37
38
deploy:
Dockerfile
@@ -18,6 +18,7 @@ RUN go mod download
18
COPY . .
19
20
ARG VERSION=dev
21
+ARG COMMIT=unknown
22
23
# Build the Go application
24
RUN go build --ldflags "-X 'main.Version=$VERSION' -X 'main.Commit=$COMMIT'" -o automirror .
0 commit comments