reproducible-containers/repro-get

v0.1.2 binaries built on GHA produces Dockerfiles for v0.1.1 (but local v0.1.2 binaries produces Dockerfiles for v0.1.2, as expected)

AkihiroSuda opened this issue · 0 comments

$ ./repro-get-v0.1.2.linux-amd64 --distro=debian dockerfile generate . debian:bullseye-20211220 gcc build-essential
$ cat Dockerfile
...
ARG REPRO_GET_VERSION=v0.1.1
ARG REPRO_GET_SHA256SUMS_SHA256SUM=da4a0fec2e5929b7b94729c6658c45298bdfe35e29c0c5c58ebcca4dfa5dfab2
...

On the CI, binaries were build with Version=v0.1.2, DownloadableVersion=v0.1.1:

#14 [build-artifacts 4/6] RUN --mount=type=cache,target=/root/.cache   --mount=type=cache,target=/go   make &&   make install
#14 sha256:2f4a191ffc481acb47b84fa9e6a2f83f6968e77a19270f1614c1ce9677b6c734
#14 0.827 go build -trimpath -ldflags="-s -w -X github.com/reproducible-containers/repro-get/pkg/version.Version=v0.1.2 -X github.com/reproducible-containers/repro-get/pkg/version.DownloadableVersion=v0.1.1" -o _output/bin/repro-get ./cmd/repro-get

But make artifacts.docker on my local laptop produces binaries with Version=v0.1.2, DownloadableVersion=v0.1.2.


Looks like actions/checkout does not checkout the expected tag

- uses: actions/checkout@v3
with:
# https://github.com/reproducible-containers/repro-get/issues/3
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}