File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed
Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 5555 build-args : |
5656 VERSION=${{ steps.infos.outputs.version }}
5757 COMMIT=${{ github.sha }}
58- COMMIT_DATE =${{ steps.infos.outputs.date }}
58+ DATE =${{ steps.infos.outputs.date }}
5959
6060 # This step calls the container workflow to generate provenance and push it to
6161 # the container registry.
Original file line number Diff line number Diff line change 99ENV CGO_ENABLED=0
1010ARG VERSION="dev"
1111ARG COMMIT
12- ARG COMMIT_DATE
12+ ARG DATE
1313RUN go build -cover \
14- -ldflags="-s -w -X 'main.Version =" $VERSION"' -X 'main.Commit =" $COMMIT"' -X 'main.CommitDate =" $COMMIT_DATE " '" \
14+ -ldflags="-s -w -X 'main.version =" $VERSION"' -X 'main.commit =" $COMMIT"' -X 'main.date =" $DATE "' -X 'main.builtBy=docker '" \
1515 -o /go/bin/ctfd-setup \
1616 cmd/ctfd-setup/main.go
1717
Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ import (
1515)
1616
1717var (
18- Version = "dev"
19- Commit = ""
20- CommitDate = ""
18+ version = "dev"
19+ commit = ""
20+ date = ""
21+ builtBy = ""
2122)
2223
2324const (
@@ -434,11 +435,12 @@ func main() {
434435435436 },
436437 },
437- Version : Version ,
438+ Version : version ,
438439 Metadata : map [string ]any {
439- "version" : Version ,
440- "commit" : Commit ,
441- "date" : CommitDate ,
440+ "version" : version ,
441+ "commit" : commit ,
442+ "date" : date ,
443+ "builtBy" : builtBy ,
442444 },
443445 }
444446
You can’t perform that action at this time.
0 commit comments