TL;DR:
How can I find manually ACTIONS_RUNTIME_TOKEN
and ACTIONS_CACHE_URL
in GitHub actions?
Context
I am trying to cache docker layers during a buildkit build in GitHub actions.
In theory, it's easy with the docker/setup-buildx-action
, docker/build-push-action
and crazy-max/ghaction-github-runtime
actions. The thing is, I cannot use them (organization policy).
The relevant part of my workflow is now:
$repo_url= "<ECR repo in aws>"
docker buildx create --use --driver=docker-container
docker buildx build --tag "${repo_url}:latest" --file docker/Dockerfile . --cache-to "type=gha,mode=max" --cache-from type=gha
The caching requires 2 variables/configuration: ACTIONS_RUNTIME_TOKEN
and
ACTIONS_CACHE_URL
. They would be set up by the ghaction-github-runtime
, which I thus cannot use. Looking at the code, it seems to export 2 variables from the environment, but I cannot find them.
How can I manually, without the help of other actions, find them?