Use process.env.RUNNER_TEMP instead of os.tmpdir() (#47)

This commit is contained in:
Andy Aylward 2024-10-30 17:16:51 -04:00 committed by GitHub
parent 93a72482ba
commit 2ebddb28d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 632 additions and 234 deletions

View file

@ -64,7 +64,7 @@ if (repositoryCacheEnabled) {
const googleCredentials = core.getInput('google-credentials')
const googleCredentialsSaved = (core.getState('google-credentials-path').length > 0)
if (googleCredentials.length > 0 && !googleCredentialsSaved) {
const tmpDir = core.toPosixPath(fs.mkdtempSync(os.tmpdir()))
const tmpDir = core.toPosixPath(fs.mkdtempSync(process.env.RUNNER_TEMP))
const googleCredentialsPath = `${tmpDir}/key.json`
fs.writeFileSync(googleCredentialsPath, googleCredentials)
bazelrc.push(`build --google_credentials=${googleCredentialsPath}`)