Replace the chained inspect||create||inspect with explicit steps:
register builder metadata without --bootstrap (create errors fail the
job), bootstrap with a single logged retry for concurrent creation, and
verify the GC policy reported by the running BuildKit daemon. A builder
created by this job without the expected policy fails the job; an
existing unmigrated builder gets a warning pointing to the manual
migration. The temporary buildkitd config is removed on exit. Existing
containers and state volumes are never recreated or removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pass a buildkitd config (reservedSpace 10GB, maxUsedSpace 20GB,
minFreeSpace 50GB) via --buildkitd-config when the multiarch builder is
created. Existing builders are reused unchanged and never recreated; a
non-fatal warning flags builders without the managed config. Document
the one-time manual migration, verification, DinD image retention
proposal and rollback in docs/buildkit-gc.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
notifications.yml is invoked via workflow_call from the caller
workflow, so inside this job gitea.event_name reports "workflow_call"
rather than the top-level event (push/schedule/...) that actually
started the run. Comparing that against the Actions API's per-run
event field (which reports the real trigger) never matched, so
previous_conclusion always stayed "unknown" and healed notifications
never fired. Now the current run's real event is captured from the API
response itself and used for the comparison, falling back to
gitea.event_name only if the current run isn't found in the scanned
history.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-08 21:08:25 +00:00
3 changed files with 288 additions and 6 deletions
if echo "${BUILDER_INFO}" | grep -Eq 'Reserved Space:[[:space:]]+(10GiB|9\.313GiB)' &&
echo "${BUILDER_INFO}" | grep -Eq 'Max Used Space:[[:space:]]+(20GiB|18\.63GiB)' &&
echo "${BUILDER_INFO}" | grep -Eq 'Min Free Space:[[:space:]]+(50GiB|46\.57GiB)'; then
echo "=== BuildKit GC config is active (reservedSpace 10GB, maxUsedSpace 20GB, minFreeSpace 50GB) ==="
elif [ "${EXPECT_GC_CONFIG}" = "true" ]; then
echo "::error::Builder ${BUILDER} was created with --buildkitd-config but the running BuildKit daemon does not report the expected GC policy."
exit 1
else
echo "::warning::The managed BuildKit GC limits (20GB target) are NOT active on the existing builder ${BUILDER} (${BUILDKIT_CONTAINER}): it predates the GC config and is reused unchanged, so it still runs with BuildKit's disk-percentage defaults and its cache can keep growing. A one-time manual migration is required, see docs/buildkit-gc.md in SharedWorkflows."
followed by `docker exec gitea-dind docker restart buildx_buildkit_multiarch0`. buildkitd then
uses its built-in defaults again. The cache volume is kept.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.