When using docker buildx build
in conjunction with the gha
backend cache type (as we do in our CI) it’s important to specify the URL and TOKEN needed to authenticate.
On Cirrus runners this is working with only ACTIONS_CACHE_URL
and ACTIONS_RUNTIME_TOKEN
, but this is not enough for the GitHub backend.
Fix this by exporting all ACTIONS_*
variables.
This fixes docker build layer cache restore/save on forks or where GH-hosted runners are being used, and addresses #31965 (comment)