ci: replace docker/build-push-action with plain docker buildx build
Release / Publish tags (push) Successful in 13s
Release / Plan (reuse the published image?) (push) Successful in 4s
Release / ci (push) Successful in 32s
Release / Build image (amd64) (push) Successful in 20s
Release / Build image (arm64) (push) Successful in 19s
CI / Format and clippy (push) Successful in 16s
CI / Tests (Linux) (push) Successful in 31s
CI / Dependency audit (push) Successful in 16s
CI / Docker image (build and smoke test) (push) Skipped
Release / Gitea release (push) Successful in 3s

docker/build-push-action's upstream repo has ~260MB of git history, which
reliably hangs the act runner's Go-based git clone on the linux-amd64
(Hostinger) runner — confirmed it's not a network or cache issue: curl to
codeload.github.com and a plain `git clone` of the same repo both complete
in seconds from the host and from inside the exact job container. Only
act's own clone of this specific action hangs, every time.

A raw `docker buildx build` with the same flags does the same job without
cloning anything.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
This commit is contained in:
Lucas RayanandClaude Sonnet 5 committed 2026-11-01 10:18:18 -03:00
1 parent f2a10ca1a6
commit 673b11c88c
1 file changed
+12 -8
+12 -8
View File
@@ -75,15 +75,19 @@ jobs:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }} username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
# Plain `docker buildx build` instead of docker/build-push-action: that
# action's upstream repo (~260MB of git history) reliably hangs the
# act runner's Go-based clone on the Hostinger host, even when curl/git
# to github.com are both fast. Same end result, no action to clone.
- name: Build and push (per architecture) - name: Build and push (per architecture)
uses: docker/build-push-action@v7 run: |
with: docker buildx build \
context: . --platform "${{ matrix.platform }}" \
platforms: ${{ matrix.platform }} --push \
push: true -t "${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ matrix.arch }}" \
tags: ${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ matrix.arch }} --cache-from "type=registry,ref=${{ needs.plan.outputs.image }}:buildcache-${{ matrix.arch }}" \
cache-from: type=registry,ref=${{ needs.plan.outputs.image }}:buildcache-${{ matrix.arch }} --cache-to "type=registry,ref=${{ needs.plan.outputs.image }}:buildcache-${{ matrix.arch }},mode=max" \
cache-to: type=registry,ref=${{ needs.plan.outputs.image }}:buildcache-${{ matrix.arch }},mode=max .
# Runs the image that was just pushed, on its own architecture. # Runs the image that was just pushed, on its own architecture.
- name: Smoke test - name: Smoke test
run: scripts/smoke-image.sh "${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ matrix.arch }}" run: scripts/smoke-image.sh "${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ matrix.arch }}"