diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 62c38e3..a609f98 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -21,6 +21,8 @@ jobs: base: ["26.10", "26.04", "24.04"] env: IMAGE: runner-images-test:${{ github.run_id }}-${{ matrix.base }} + REGISTRY: git.fristy.net + CACHE: git.fristy.net/actions/runner-images:buildcache-${{ matrix.base }} steps: - name: Checkout uses: actions/checkout@v7 @@ -28,6 +30,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 + - name: Log in to the registry (build cache) + run: | + token="${{ secrets.REGISTRY_TOKEN }}" + [ -n "$token" ] || { echo "REGISTRY_TOKEN secret is missing" >&2; exit 1; } + echo "$token" | docker login "${{ env.REGISTRY }}" -u "${{ secrets.REGISTRY_USERNAME || github.actor }}" --password-stdin + - name: Build ${{ matrix.base }} amd64 uses: docker/build-push-action@v7 with: @@ -37,6 +45,7 @@ jobs: pull: true push: false load: true + cache-from: type=registry,ref=${{ env.CACHE }} build-args: | BASE_IMAGE_TAG=${{ matrix.base }} tags: ${{ env.IMAGE }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3407176..bb35705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,22 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Builds no longer fail when a GitHub release asset answers with HTTP 618 + (`jwt:expired`). `curl` is wrapped in `/usr/local/bin` with + `--retry 5 --retry-all-errors` and a `Cache-Control: no-cache` request header, + so the Dockerfile's own downloads and installer scripts such as + `cargo-zigbuild-installer.sh` retry instead of killing the layer. + +### Changed + +- `build.yaml` reads the `buildcache-` registry cache that `release.yaml` + writes on every `main` build, so a pull request reuses the tool layers instead + of downloading them again. The pull request still publishes nothing. + ## [1.0.1] - 2026-11-20 ### Fixed diff --git a/dockerfiles/ubuntu.dockerfile b/dockerfiles/ubuntu.dockerfile index f8b04d9..711deff 100644 --- a/dockerfiles/ubuntu.dockerfile +++ b/dockerfiles/ubuntu.dockerfile @@ -12,7 +12,7 @@ ARG NODE_VERSION=26.13.1 # renovate: datasource=npm depName=npm ARG NPM_VERSION=12.2.3 # renovate: datasource=npm depName=pnpm -ARG PNPM_VERSION=12.23.0 +ARG PNPM_VERSION=12.24.0 # renovate: datasource=npm depName=corepack ARG COREPACK_VERSION=0.36.0 # renovate: datasource=github-releases depName=mikefarah/yq @@ -49,6 +49,12 @@ ENV DEBIAN_FRONTEND=noninteractive \ SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] +RUN printf '%s\n' \ + '#!/bin/sh' \ + 'exec /usr/bin/curl --retry 5 --retry-all-errors --retry-delay 2 -H "Cache-Control: no-cache" "$@"' \ + > /usr/local/bin/curl \ + && chmod 0755 /usr/local/bin/curl + RUN case "${TARGETARCH}" in \ amd64) arch=x86_64; goarch=amd64; node_arch=x64; gh_arch=amd64; trivy_arch=64bit; zig_arch=x86_64 ;; \ arm64) arch=aarch64; goarch=arm64; node_arch=arm64; gh_arch=arm64; trivy_arch=ARM64; zig_arch=aarch64 ;; \