Skip to content

Conversation

@crazy-max
Copy link
Owner

@crazy-max
Copy link
Owner Author

https://github.com/crazy-max/diun/actions/runs/19333611496/job/55303090837#step:8:560


#38 [linux/amd64 build 1/1] RUN --mount=type=bind,target=.     --mount=type=bind,from=version,source=/tmp/.version,target=/tmp/.version     --mount=type=cache,target=/root/.cache     --mount=type=cache,target=/go/pkg/mod <<EOT (set -ex...)
#38 0.111 + cat /tmp/.version
#38 0.113 + xx-go build -trimpath -ldflags '-s -w -X main.version=8f3d03f' -o /usr/bin/diun ./cmd
#38 ...

Seems git context doesn't fetch full history so versioning is broken.

Before when using path context and @action/checkout with fetch-depth: 0:

-
name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

We had: https://github.com/crazy-max/diun/actions/runs/19331978878/job/55297510739#step:8:596

#40 [linux/amd64->ppc64le build 1/1] RUN --mount=type=bind,target=.     --mount=type=bind,from=version,source=/tmp/.version,target=/tmp/.version     --mount=type=cache,target=/root/.cache     --mount=type=cache,target=/go/pkg/mod <<EOT (set -ex...)
#40 0.098 + cat /tmp/.version
#40 0.102 + xx-go build -trimpath -ldflags '-s -w -X main.version=v4.30.0-30-g42da408e' -o /usr/bin/diun ./cmd
#40 ...

@tonistiigi I wonder if we could have a new query param for git context to set fetch-depth similar to @action/checkout:

@crazy-max crazy-max force-pushed the docker-github-builder branch 4 times, most recently from 0d90992 to cc98112 Compare November 16, 2025 10:36
@crazy-max crazy-max force-pushed the docker-github-builder branch 4 times, most recently from dc1cd71 to 3615b57 Compare November 28, 2025 14:09
@crazy-max crazy-max force-pushed the docker-github-builder branch from 3615b57 to 5934dfb Compare December 1, 2025 11:12
@crazy-max crazy-max marked this pull request as ready for review December 1, 2025 12:09
@crazy-max crazy-max marked this pull request as draft December 19, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants