mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-01 05:45:06 +09:00
chore!: remove old dist files
TODO: Add dist generation into the build steps
This commit is contained in:
-12
@@ -1,12 +0,0 @@
|
||||
export interface assumeRoleParams {
|
||||
region: string;
|
||||
roleToAssume: string;
|
||||
roleDurationSeconds: number;
|
||||
roleSessionName: string;
|
||||
roleSkipSessionTagging?: boolean;
|
||||
sourceAccountId?: string;
|
||||
roleExternalId?: string;
|
||||
webIdentityTokenFile?: string;
|
||||
webIdentityToken?: string;
|
||||
}
|
||||
export declare function assumeRole(params: assumeRoleParams): Promise<import("@aws-sdk/client-sts").AssumeRoleWithWebIdentityCommandOutput>;
|
||||
-129
File diff suppressed because one or more lines are too long
-11
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* When the GitHub Actions job is done, clean up any environment variables that
|
||||
* may have been set by the configure-aws-credentials steps in the job.
|
||||
*
|
||||
* Environment variables are not intended to be shared across different jobs in
|
||||
* the same GitHub Actions workflow: GitHub Actions documentation states that
|
||||
* each job runs in a fresh instance. However, doing our own cleanup will
|
||||
* give us additional assurance that these environment variables are not shared
|
||||
* with any other jobs.
|
||||
*/
|
||||
export declare function cleanup(): Promise<void>;
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cleanup = void 0;
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const helpers_1 = require("../helpers");
|
||||
/**
|
||||
* When the GitHub Actions job is done, clean up any environment variables that
|
||||
* may have been set by the configure-aws-credentials steps in the job.
|
||||
*
|
||||
* Environment variables are not intended to be shared across different jobs in
|
||||
* the same GitHub Actions workflow: GitHub Actions documentation states that
|
||||
* each job runs in a fresh instance. However, doing our own cleanup will
|
||||
* give us additional assurance that these environment variables are not shared
|
||||
* with any other jobs.
|
||||
*/
|
||||
async function cleanup() {
|
||||
try {
|
||||
// The GitHub Actions toolkit does not have an option to completely unset
|
||||
// environment variables, so we overwrite the current value with an empty
|
||||
// string. The AWS CLI and AWS SDKs will behave correctly: they treat an
|
||||
// empty string value as if the environment variable does not exist.
|
||||
core.exportVariable('AWS_ACCESS_KEY_ID', '');
|
||||
core.exportVariable('AWS_SECRET_ACCESS_KEY', '');
|
||||
core.exportVariable('AWS_SESSION_TOKEN', '');
|
||||
core.exportVariable('AWS_DEFAULT_REGION', '');
|
||||
core.exportVariable('AWS_REGION', '');
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed((0, helpers_1.errorMessage)(error));
|
||||
}
|
||||
}
|
||||
exports.cleanup = cleanup;
|
||||
if (require.main === module) {
|
||||
(async () => {
|
||||
await cleanup();
|
||||
})().catch((error) => {
|
||||
core.setFailed((0, helpers_1.errorMessage)(error));
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2V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gZW52aXJvbm1lbnQgdmFyaWFibGVzLCBzbyB3ZSBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgdmFsdWUgd2l0aCBhbiBlbXB0eVxuICAgIC8vIHN0cmluZy4gVGhlIEFXUyBDTEkgYW5kIEFXUyBTREtzIHdpbGwgYmVoYXZlIGNvcnJlY3RseTogdGhleSB0cmVhdCBhblxuICAgIC8vIGVtcHR5IHN0cmluZyB2YWx1ZSBhcyBpZiB0aGUgZW52aXJvbm1lbnQgdmFyaWFibGUgZG9lcyBub3QgZXhpc3QuXG4gICAgY29yZS5leHBvcnRWYXJpYWJsZSgnQVdTX0FDQ0VTU19LRVlfSUQnLCAnJyk7XG4gICAgY29yZS5leHBvcnRWYXJpYWJsZSgnQVdTX1NFQ1JFVF9BQ0NFU1NfS0VZJywgJycpO1xuICAgIGNvcmUuZXhwb3J0VmFyaWFibGUoJ0FXU19TRVNTSU9OX1RPS0VOJywgJycpO1xuICAgIGNvcmUuZXhwb3J0VmFyaWFibGUoJ0FXU19ERUZBVUxUX1JFR0lPTicsICcnKTtcbiAgICBjb3JlLmV4cG9ydFZhcmlhYmxlKCdBV1NfUkVHSU9OJywgJycpO1xuICB9IGNhdGNoIChlcnJvcikge1xuICAgIGNvcmUuc2V0RmFpbGVkKGVycm9yTWVzc2FnZShlcnJvcikpO1xuICB9XG59XG5pZiAocmVxdWlyZS5tYWluID09PSBtb2R1bGUpIHtcbiAgKGFzeW5jICgpID0+IHtcbiAgICBhd2FpdCBjbGVhbnVwKCk7XG4gIH0pKCkuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgY29yZS5zZXRGYWlsZWQoZXJyb3JNZXNzYWdlKGVycm9yKSk7XG4gIH0pO1xufVxuIl19
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
import { STSClient } from '@aws-sdk/client-sts';
|
||||
export declare function getStsClient(region: string, agent?: string): STSClient;
|
||||
export declare function sanitizeGithubActor(actor: string): string;
|
||||
export declare function sanitizeGithubWorkflowName(name: string): string;
|
||||
export declare function errorMessage(error: unknown): string;
|
||||
export declare function isDefined<T>(i: T | undefined | null): i is T;
|
||||
export declare function retryAndBackoff<T>(fn: () => Promise<T>, isRetryable: boolean, retries?: number, maxRetries?: number, base?: number): Promise<T>;
|
||||
-63
File diff suppressed because one or more lines are too long
-1
@@ -1 +0,0 @@
|
||||
export declare function run(): Promise<void>;
|
||||
-218
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user