mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
* CI: host the Debian image the preloads build in on a release of this repo The preloads step pulled debian:bullseye from a public mirror on every build whose preload cache missed; the mirrors rate-limit the shared runner addresses and failed two builds in an hour tonight. Debian 11 is frozen upstream, so the image is published once (workflow ci-debian-image.yml, release ci-debian-bullseye-r1, pinned in tools/linuxfs/debian-image.env) and the build downloads that file; only if that fails does it pull, with retries. * CI: pin the published Debian image (ci-debian-bullseye-r1, 34 MB) * CI: a new Debian image rebuilds the preloads (env file joins the cache key)
49 lines
2.2 KiB
YAML
49 lines
2.2 KiB
YAML
name: Publish the CI Debian image
|
|
|
|
# Pulls the Debian 11 image the x86 preloads build in, once, and publishes it as a release asset
|
|
# on this repo so build.yml never depends on a registry mirror's rate limit. Run it again (with a
|
|
# new tag) only to refresh the image; tools/linuxfs/debian-image.env names the one builds use.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Release tag to publish to'
|
|
required: true
|
|
default: 'ci-debian-bullseye-r1'
|
|
push:
|
|
branches: [ci/cache-debian-image]
|
|
paths: ['.github/workflows/ci-debian-image.yml']
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Pull, save and publish
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
TAG: ${{ inputs.tag || 'ci-debian-bullseye-r1' }}
|
|
run: |
|
|
set -euo pipefail
|
|
image=public.ecr.aws/docker/library/debian:bullseye
|
|
for attempt in 1 2 3 4 5 6; do
|
|
docker pull "$image" && break
|
|
[ "$attempt" -lt 6 ] || { echo "::error::could not pull $image"; exit 1; }
|
|
echo "pull attempt $attempt failed (registry busy?); retrying in $((attempt * 30)) s"
|
|
sleep $((attempt * 30))
|
|
done
|
|
docker image inspect "$image" --format 'image id {{.Id}} created {{.Created}}'
|
|
docker save "$image" | zstd -19 -T0 -o debian-bullseye.tar.zst
|
|
sha256sum debian-bullseye.tar.zst | tee SHA256SUMS
|
|
ls -l debian-bullseye.tar.zst
|
|
if ! gh release view "$TAG" -R "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
|
|
gh release create "$TAG" -R "$GITHUB_REPOSITORY" --title "CI Debian 11 image ($TAG)" --latest=false \
|
|
--notes "The debian:bullseye image build.yml compiles the x86 preloads in (glibc 2.31), saved with docker save and compressed with zstd. Pulled from public.ecr.aws/docker/library/debian:bullseye on $(date -u +%Y-%m-%d); image id $(docker image inspect "$image" --format '{{.Id}}'). Pinned in tools/linuxfs/debian-image.env."
|
|
fi
|
|
gh release upload "$TAG" -R "$GITHUB_REPOSITORY" debian-bullseye.tar.zst SHA256SUMS --clobber
|
|
{ echo "Published \`$TAG\`:"; echo; echo '```'; cat SHA256SUMS; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
|