mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-06-05 19:53:32 +00:00
* Revert "chore: Update dist" This reverts commite8614cfbf0. * Revert "chore(deps): bump @aws-sdk/client-sts from 3.1045.0 to 3.1049.0 (#1782)" This reverts commit4684f47f89. * Revert "chore: Update dist" This reverts commit48b8685c96. * Revert "chore(deps-dev): bump @smithy/property-provider from 4.3.1 to 4.3.3 (#1783)" This reverts commitfe6ad3af19. * Revert "chore: Update dist" This reverts commit2520c5e921. * Revert "chore(deps-dev): bump @aws-sdk/credential-provider-env (#1784)" This reverts commitbc1093db1d. * Revert "chore(deps-dev): bump @types/node from 25.7.0 to 25.9.0 (#1785)" This reverts commitffde832a1d. * Revert "chore: Update dist" This reverts commit707acd96f6. * Revert "chore(deps): bump @smithy/node-http-handler from 4.7.1 to 4.7.3 (#1781)" This reverts commita7c33ae483. * Revert "chore: update README for additional claim support (#1779)" This reverts commit713aaabfec. * Revert "chore: Update dist" This reverts commite6e8eba750. * Revert "fix: skip credential check on output-env-credentials: false (#1778)" This reverts commit58e7c47adf. * Revert "chore: document forgejo compatibility (#1776)" This reverts commitf35a7d7d7e. * Revert "chore: Update dist" This reverts commit3884f59ecd. * Revert "feat: add additional session tags by default (#1775)" This reverts commite0ba768507. * Revert "chore: Update dist" This reverts commit6795889618. * Revert "feat: expose run id in STS client user-agent (#1774)" This reverts commit29d1be3027. * Revert "chore(deps-dev): bump @types/node from 25.6.0 to 25.7.0 (#1773)" This reverts commitef734cca81. * Revert "chore(deps-dev): bump @biomejs/biome from 2.4.14 to 2.4.15 (#1772)" This reverts commit7521c55910. * Revert "chore: Update dist" This reverts commitc0e2737f14. * Revert "chore(deps): bump @smithy/node-http-handler from 4.6.1 to 4.7.1 (#1770)" This reverts commitdbd503f368. * Revert "chore: Update dist" This reverts commit18a236fbd1. * Revert "chore(deps-dev): bump @smithy/property-provider from 4.2.14 to 4.3.1 (#1771)" This reverts commit1ab31502aa. * Revert "chore(deps-dev): bump @vitest/coverage-v8 from 4.1.5 to 4.1.6 (#1768)" This reverts commit1fb495c4b2. * Revert "chore: Update dist" This reverts commit1e8fec8ea1. * Revert "chore(deps): bump @aws-sdk/client-sts from 3.1044.0 to 3.1045.0 (#1767)" This reverts commita388f23f7d. * Revert "chore: update documentation for environment workflows (#1766)" This reverts commit3f7e1b63d7. * Revert "feat: add regex validation to role-session-name (#1765)" This reverts commite35449909c. * Revert "chore: Update dist" This reverts commit958a80fc34. * Revert "feat: add more retry logic and better logging (#1764)" This reverts commit540d0c13ae. * Revert "chore: automate README version bumping (#1763)" This reverts commit07ada0fe07. * Revert "chore: Update dist" This reverts commitf8d4eb68a9. * Revert "feat: support custom STS endpoints (#1762)" This reverts commit8d52d05d7a. * Revert "chore: Update dist" This reverts commit681892c11b. * Revert "chore: configure codeql to ignore generated code (#1760)" This reverts commitdc2353e57a. * Revert "feat: Allow custom session tags to be passed when assuming a role (#1759)" This reverts commit61f50f630f. * Revert "chore: automatic major version tagging (#1565)" This reverts commitc36525a567. * Revert "chore: bump unit test node version (#1758)" This reverts commit39d1702721. * Revert "chore(deps): bump @aws-sdk/client-sts from 3.1043.0 to 3.1044.0 (#1754)" This reverts commit4cfda40a13. * Revert "chore(deps-dev): bump @biomejs/biome from 2.4.13 to 2.4.14 (#1756)" This reverts commit8856e12f3a. * Revert "chore(deps): bump @actions/core from 2.0.3 to 3.0.1 (#1746)" This reverts commit64d8e82527. * Revert "chore(deps-dev): bump vitest from 3.2.4 to 4.1.5 (#1748)" This reverts commit78f374f6d1.
114 lines
3.3 KiB
TypeScript
114 lines
3.3 KiB
TypeScript
import type * as core from '@actions/core';
|
|
|
|
const inputs = {
|
|
GH_OIDC_INPUTS: {
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
'aws-region': 'fake-region-1',
|
|
'special-characters-workaround': 'true',
|
|
},
|
|
IAM_USER_INPUTS: {
|
|
'aws-access-key-id': 'MYAWSACCESSKEYID',
|
|
'aws-secret-access-key': 'MYAWSSECRETACCESSKEY',
|
|
'aws-region': 'fake-region-1',
|
|
},
|
|
IAM_ASSUMEROLE_INPUTS: {
|
|
'aws-access-key-id': 'MYAWSACCESSKEYID',
|
|
'aws-secret-access-key': 'MYAWSSECRETACCESSKEY',
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
'aws-region': 'fake-region-1',
|
|
},
|
|
WEBIDENTITY_TOKEN_FILE_INPUTS: {
|
|
'web-identity-token-file': 'file.txt',
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
'aws-region': 'fake-region-1',
|
|
},
|
|
EXISTING_ROLE_INPUTS: {
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
'role-chaining': 'true',
|
|
'aws-region': 'fake-region-1',
|
|
},
|
|
USE_EXISTING_CREDENTIALS_INPUTS: {
|
|
'aws-region': 'fake-region-1',
|
|
'use-existing-credentials': 'true',
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
},
|
|
NO_ENV_CREDS_INPUTS: {
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
'aws-region': 'fake-region-1',
|
|
'output-env-credentials': 'false',
|
|
},
|
|
STEP_BUT_NO_ENV_INPUTS: {
|
|
'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
'aws-region': 'fake-region-1',
|
|
'output-env-credentials': 'false',
|
|
'output-credentials': 'true',
|
|
},
|
|
};
|
|
|
|
const envs = {
|
|
GITHUB_REPOSITORY: 'MY-REPOSITORY-NAME',
|
|
GITHUB_WORKFLOW: 'MY-WORKFLOW-ID',
|
|
GITHUB_ACTION: 'MY-ACTION-NAME',
|
|
GITHUB_ACTOR: 'MY-USERNAME[bot]',
|
|
GITHUB_SHA: 'MY-COMMIT-ID',
|
|
GITHUB_WORKSPACE: '/home/github',
|
|
GITHUB_ACTIONS: 'true',
|
|
};
|
|
|
|
const outputs = {
|
|
STS_CREDENTIALS: {
|
|
Credentials: {
|
|
AccessKeyId: 'STSAWSACCESSKEYID',
|
|
SecretAccessKey: 'STSAWSSECRETACCESSKEY',
|
|
SessionToken: 'STSAWSSESSIONTOKEN',
|
|
Expiration: new Date(8640000000000000),
|
|
},
|
|
AssumedRoleUser: {
|
|
Arn: 'arn:aws:sts::111111111111:assumed-role/MY-ROLE/',
|
|
AssumedRoleId: 'AROAFAKEASSUMEDROLEID',
|
|
},
|
|
},
|
|
GET_CALLER_IDENTITY: {
|
|
Account: '111111111111',
|
|
Arn: 'arn:aws:iam::111111111111:role/MY-ROLE',
|
|
},
|
|
FAKE_STS_ACCESS_KEY_ID: 'STSAWSACCESSKEYID',
|
|
FAKE_STS_SECRET_ACCESS_KEY: 'STSAWSSECRETACCESSKEY',
|
|
FAKE_STS_SESSION_TOKEN: 'STSAWSSESSIONTOKEN',
|
|
ODD_CHARACTER_CREDENTIALS: {
|
|
Credentials: {
|
|
AccessKeyId: 'STSA#$%^&',
|
|
SecretAccessKey: 'STSA#$%^&Key',
|
|
SessionToken: 'STSA#$%^',
|
|
Expiration: new Date(8640000000000000),
|
|
},
|
|
AssumedRoleUser: {
|
|
Arn: 'arn:aws:sts::111111111111:assumed-role/MY-ROLE/',
|
|
AssumedRoleId: 'AROAFAKEASSUMEDROLEID',
|
|
},
|
|
},
|
|
};
|
|
|
|
export default {
|
|
getInput: (fakeEnv: Record<string, string>) => {
|
|
return (name: string, options?: core.InputOptions): string => {
|
|
if (!fakeEnv[name]) {
|
|
if (options?.required) throw new Error(`Input ${name} not found`);
|
|
return '';
|
|
}
|
|
return fakeEnv[name];
|
|
};
|
|
},
|
|
getMultilineInput: (fakeEnv: Record<string, string[]>) => {
|
|
return (name: string, options?: core.InputOptions): string[] => {
|
|
if (!fakeEnv[name]) {
|
|
if (options?.required) throw new Error(`Input ${name} not found`);
|
|
return [];
|
|
}
|
|
return fakeEnv[name];
|
|
};
|
|
},
|
|
...inputs,
|
|
outputs,
|
|
envs,
|
|
} as const;
|