Skip to content

ci: use docker github builder to build the image#1544

Draft
crazy-max wants to merge 3 commits intomasterfrom
docker-github-builder
Draft

ci: use docker github builder to build the image#1544
crazy-max wants to merge 3 commits intomasterfrom
docker-github-builder

Conversation

@crazy-max
Copy link
Copy Markdown
Owner

@crazy-max
Copy link
Copy Markdown
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 5 times, most recently 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
@crazy-max crazy-max force-pushed the docker-github-builder branch 6 times, most recently from f9296db to 8836723 Compare March 18, 2026 11:17
@crazy-max crazy-max force-pushed the docker-github-builder branch 2 times, most recently from 59b169e to b12dce7 Compare March 18, 2026 12:01
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.

1 participant