-
Notifications
You must be signed in to change notification settings - Fork 521
Revert "Use RUNNER_TEMP to export credentials" #149
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
Conversation
This reverts commit 191a0f3.
|
Is there no other place these can be kept? Does It'd be nice if there was a full reference on the different env vars and how they work out in VM vs Container. |
It's how looks default run of Docker based GH action for our case: Maybe, the way to use one more input param for this action and to set either RUNNER_TEMP or GITHUB_WORKSPACE as a "workspace" also will be fine. |
Sure, but that's a breaking change. I think we should revert this. If we want to introduce that change, it should be in a new tagged version so people can upgrade safely. |
bharathkkb
left a comment
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.
LGTM
Seems like macos tests are queued/failing but I dont think its related.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
The GitHub Action currently puts generated credentials into $GITHUB_WORKSPACE (/github/workspace). Unfortunately this is also the working directory of the checkout, so it's too easy to accidentally bundle the generated credentials into Docker containers, binaries, or anything that uses `*` or `.` as a build context. In the past, we tried to move the exported credentials into RUNNER_TEMP or other directories, but it always introduced incompatibility with the various community workflows (Docker, self-hosted, etc.): - google-github-actions/setup-gcloud#148 - google-github-actions/setup-gcloud#149 - google-github-actions/setup-gcloud#405 - google-github-actions/setup-gcloud#412 While undocumented, it appears that `/github/home` is an understood path, AND that path is mounted into Docker containers. That means we can export credentials outside of the workspace and still have them available inside the Docker container without users taking manual actions. This comes at three major costs: 1. We have to write the file into two locations. This isn't ideal, but it's also not the end of the world. 2. We would be relying on an undocumented filepath which GitHub could change at any point in the future. Since this is not part of the publicly-documented API, GitHub is within their rights to change this without notice, potentially breaking everyone/everything. 3. Because of the previous point, there are no environment variables that export these paths. We have to dynamically compile them, and it's a bit messy.
Reverts #148
As I kinda suspected but couldn't remember, there's a reason we use the action's temporary directory.
/cc @travisgroth @ViacheslavKudinov