diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6cf2c0f..204d865 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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 }}"