-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using gha cache with docker-container #20748
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -57,6 +57,14 @@ exposed. Consider using the | |||
[`crazy-max/ghaction-github-runtime`](https://github.com/crazy-max/ghaction-github-runtime), | |||
GitHub Action as a helper for exposing the variables. | |||
|
|||
If you are using the `docker-container` driver, `ACTIONS_RUNTIME_TOKEN` and `ACTIONS_RUNTIME_URL` environment variables must be passed into the container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed, Buildx already sets token
and url
attributes for gha
exporter during build: https://github.com/docker/buildx/blob/96eb69aea4e03baf516f29ec36aa93a9c284f085/util/buildflags/cache.go#L69-L84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh cool. I wonder why we were having an issue getting this to work. Maybe an older buildx not using the controller api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you run docker buildx
in a run
step? If that's the case then ACTIONS_RUNTIME_TOKEN
and ACTIONS_RUNTIME_URL
envs are not exposed: https://docs.docker.com/build/cache/backends/gha/#authentication
You would need smth like https://github.com/crazy-max/ghaction-github-runtime?tab=readme-ov-file#usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we're definitely using that. Will have to take a closer look.
Description
documents how to use gha cache with
docker-container
driverRelated issues or tickets
Reviews