ci: cut PR CI time with a prebuilt image, ccache, and no QML cachegen #22
@@ -20,12 +20,21 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: docker build --pull -t "$IMAGE" .gitea/ci-image
|
||||
# No layer cache, so each rebuild picks up the week's Arch updates.
|
||||
run: docker build --pull --no-cache -t "$IMAGE" .gitea/ci-image
|
||||
- name: Push
|
||||
# Gitea's Actions token cannot push to the container registry, so this uses an
|
||||
# access token with the write:package scope.
|
||||
# access token with the write:package scope. Cloudflare rejects request bodies over
|
||||
# 100 MB and docker push sends each layer in one request, so regctl pushes the
|
||||
# layers in 50 MB chunks instead.
|
||||
env:
|
||||
TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||
run: |
|
||||
echo "$TOKEN" | docker login git.trivk.dev -u "${{ github.repository_owner }}" --password-stdin
|
||||
docker push "$IMAGE"
|
||||
curl -fsSL -o /usr/local/bin/regctl \
|
||||
https://github.com/regclient/regclient/releases/download/v0.11.7/regctl-linux-amd64
|
||||
echo "3737fbbdd791e04e7a831640b681f3397a376498e80e2ad9b1b2d27296f239bc /usr/local/bin/regctl" | sha256sum -c
|
||||
chmod +x /usr/local/bin/regctl
|
||||
echo "$TOKEN" | regctl registry login git.trivk.dev -u "${{ github.repository_owner }}" --pass-stdin
|
||||
regctl registry set git.trivk.dev --blob-chunk 52428800 --blob-max 52428800
|
||||
docker save "$IMAGE" -o "$RUNNER_TEMP/image.tar"
|
||||
regctl image import "$IMAGE" "$RUNNER_TEMP/image.tar"
|
||||
Reference in new issue
Block a user