mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-12-25 22:37:00 +00:00
Allow to use existing AWS credentials even on RunsOn, by setting RUNS_ON_RUNNER_NAME=""
This commit is contained in:
parent
c416bffd71
commit
cf6e7f2371
2 changed files with 2 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ export interface ArtifactCacheEntry {
|
|||
|
||||
// if executing from RunsOn, unset any existing AWS env variables so that we can use the IAM instance profile for credentials
|
||||
// see unsetCredentials() in https://github.com/aws-actions/configure-aws-credentials/blob/v4.0.2/src/helpers.ts#L44
|
||||
if (process.env.RUNS_ON_RUNNER_NAME) {
|
||||
if (process.env.RUNS_ON_RUNNER_NAME && process.env.RUNS_ON_RUNNER_NAME !== "") {
|
||||
delete process.env.AWS_ACCESS_KEY_ID;
|
||||
delete process.env.AWS_SECRET_ACCESS_KEY;
|
||||
delete process.env.AWS_SESSION_TOKEN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue