File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches : [main]
4+ pull_request :
5+ branches : [main]
6+
7+ permissions : {}
8+
9+ jobs :
10+ reproducibility :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ steps :
15+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16+ with :
17+ persist-credentials : false
18+ - uses : actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
19+ with :
20+ go-version-file : go.mod
21+ cache : false
22+ - uses : goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7
23+ with :
24+ version : v2.15.2
25+ install-only : true
26+ - name : Build the release artifact with goreleaser
27+ run : goreleaser build --snapshot --clean --single-target -o /tmp/goreleaser-build
28+
29+ - name : Rebuild from source and compare digests
30+ run : |
31+ VERSION=$(jq -r .version dist/metadata.json)
32+ COMMIT=$(jq -r .commit dist/metadata.json | cut -c1-7)
33+ cp -a . /tmp/src-elsewhere
34+ cd /tmp/src-elsewhere
35+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOAMD64=v1 \
36+ go build -trimpath \
37+ -ldflags="-s -w -X main.Version=$VERSION -X main.Commit=$COMMIT" \
38+ -o /tmp/plain-build .
39+ sha256sum /tmp/goreleaser-build /tmp/plain-build
40+ cmp /tmp/goreleaser-build /tmp/plain-build \
41+ && echo "Reproducible build confirmed"
Original file line number Diff line number Diff line change 77builds :
88 - env :
99 - CGO_ENABLED=0
10+ flags :
11+ - -trimpath
1012 ldflags :
1113 - -s -w
1214 - -X main.Version={{.Version}}
You can’t perform that action at this time.
0 commit comments