Register a post-job step that removes a Docker Buildx builder after later post steps have finished.
- uses: hoverkraft-tech/ci-github-container/actions/docker/cleanup-builder@e4bf7a12228a2a4b5993d2d36b99b4dd0ec80bf5 # 0.32.1
with:
# Docker Buildx builder name to remove during post-job cleanup.
builder: ""
# Whether cleanup should run during the post-job phase.
# Default: `true`
enabled: true| Input | Description | Required | Default |
|---|---|---|---|
builder |
Docker Buildx builder name to remove during post-job cleanup. | false | - |
enabled |
Whether cleanup should run during the post-job phase. | false | true |
Use this action before other actions whose post-job hooks still need the builder. It is intended as a workaround for GitHub Actions runner behavior around post-step ordering in composite actions. See actions/runner#1657.
In practice, this means the built-in docker/setup-buildx-action cleanup can run too early for actions such as docker/build-push-action or reproducible-containers/buildkit-cache-dance that still access the builder during their own post-job hooks.
This action works by registering its cleanup post hook earlier, so the runner executes it later than the post hooks that still need the builder.
Contributions are welcome! Please see the contributing guidelines for more details.
This project is licensed under the MIT License.
SPDX-License-Identifier: MIT
Copyright © 2026 hoverkraft
For more details, see the license.
This documentation was automatically generated by CI Dokumentor.