ci: replace docker/build-push-action with plain docker buildx build

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 91dc620cee
1 file changed
+12 -8
+12 -8
View File
@@ -75,15 +75,19 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
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)
uses: docker/build-push-action@v7
with:
context: .
platforms: ${{ matrix.platform }}
push: true
tags: ${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ 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
run: |
docker buildx build \
--platform "${{ matrix.platform }}" \
--push \
-t "${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ 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" \
.
# Runs the image that was just pushed, on its own architecture.
- name: Smoke test
run: scripts/smoke-image.sh "${{ needs.plan.outputs.image }}:build-${{ gitea.sha }}-${{ matrix.arch }}"