2020-05-07 15:03:20 -04:00
|
|
|
// Certain env variables are not set by default in a shell context and are only available in a node context from a running action
|
|
|
|
|
// In order to be able to restore and save cache e2e in a shell when running CI tests, we need these env variables set
|
2020-09-30 09:46:54 -04:00
|
|
|
const fs = require('fs');
|
|
|
|
|
const os = require('os');
|
|
|
|
|
const filePath = process.env[`GITHUB_ENV`]
|
2025-05-06 20:02:27 +00:00
|
|
|
fs.appendFileSync(filePath, `ACTIONS_CACHE_SERVICE_V2=true${os.EOL}`, {
|
2025-05-06 19:50:44 +00:00
|
|
|
encoding: 'utf8'
|
2025-05-06 20:22:05 +00:00
|
|
|
})
|
|
|
|
|
fs.appendFileSync(filePath, `ACTIONS_RESULTS_URL=${process.env.ACTIONS_RESULTS_URL}${os.EOL}`, {
|
|
|
|
|
encoding: 'utf8'
|
2025-05-07 08:31:17 +00:00
|
|
|
})
|
|
|
|
|
fs.appendFileSync(filePath, `ACTIONS_RUNTIME_TOKEN=${process.env.ACTIONS_RUNTIME_TOKEN}${os.EOL}`, {
|
|
|
|
|
encoding: 'utf8'
|
|
|
|
|
})
|
|
|
|
|
fs.appendFileSync(filePath, `GITHUB_RUN_ID=${process.env.GITHUB_RUN_ID}${os.EOL}`, {
|
|
|
|
|
encoding: 'utf8'
|
2020-09-30 09:46:54 -04:00
|
|
|
})
|