Skip to content

Commit caa002d

Browse files
committed
Build v3.5.0
1 parent 690f0ab commit caa002d

File tree

4 files changed

+29
-18
lines changed

4 files changed

+29
-18
lines changed

dist/index.js

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,43 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
4343
const core = __importStar(__nccwpck_require__(37484));
4444
const methods_azure_1 = __nccwpck_require__(37940);
4545
async function run() {
46-
// Parameters from the developer in their GitHub Actions workflow
46+
const containerName = core.getInput('container_name');
47+
const sourceFolder = core.getInput('source_folder');
48+
const destinationFolder = core.getInput('destination_folder');
49+
const cleanDestinationPath = core.getInput('clean_destination_folder').toLowerCase() === 'true';
50+
const failIfSourceEmpty = core.getInput('fail_if_source_empty').toLowerCase() === 'true';
51+
const isRecursive = core.getInput('is_recursive').toLowerCase() === 'true';
52+
const deleteIfExists = core.getInput('delete_if_exists').toLowerCase() === 'false';
53+
// AuthType 1 - If using ConnectionString, this value is required
54+
// Note if a value is present, we automatically switch into AuthType 1 (see methods-azure.ts Line 59)
4755
const connectionString = core.getInput('connection_string');
56+
// AuthType 2 - If using Service Principal, these values are required
4857
const tenantId = core.getInput('tenant_id');
4958
const clientId = core.getInput('client_id');
5059
const clientSecret = core.getInput('client_secret');
5160
const storageAccount = core.getInput('storage_account');
52-
core.debug('Parameters received:');
53-
core.debug(`connection_string: ${connectionString ? '***' : '<not provided>'}`);
54-
core.debug(`tenant_id: ${tenantId ? '***' : '<not provided>'}`);
55-
core.debug(`client_id: ${clientId ? '***' : '<not provided>'}`);
56-
core.debug(`client_secret: ${clientSecret ? '***' : '<not provided>'}`);
57-
core.debug(`storage_account: ${storageAccount ? '***' : '<not provided>'}`);
61+
// For debugging purposes only
62+
// When forking this repo, be careful to not log secrets actual values (Github secrets should be masked, but be safe by default).
63+
// core.debug('Parameters received:');
64+
// core.debug(`container_name: ${containerName ? '***' : '<not provided>'}`);
65+
// core.debug(`source_folder: ${sourceFolder ? '***' : '<not provided>'}`);
66+
// core.debug(`destination_folder: ${destinationFolder ? '***' : '<not provided>'}`);
67+
// core.debug(`clean_destination_folder: ${cleanDestinationPath ? '***' : '<not provided>'}`);
68+
// core.debug(`fail_if_source_empty: ${failIfSourceEmpty ? '***' : '<not provided>'}`);
69+
// core.debug(`is_recursive: ${isRecursive ? '***' : '<not provided>'}`);
70+
// core.debug(`delete_if_exists: ${deleteIfExists ? '***' : '<not provided>'}`);
71+
// core.debug(`connection_string: ${connectionString ? '***' : '<not provided>'}`);
72+
// core.debug(`tenant_id: ${tenantId ? '***' : '<not provided>'}`);
73+
// core.debug(`client_id: ${clientId ? '***' : '<not provided>'}`);
74+
// core.debug(`client_secret: ${clientSecret ? '***' : '<not provided>'}`);
75+
// core.debug(`storage_account: ${storageAccount ? '***' : '<not provided>'}`);
5876
let authPayload;
5977
if (connectionString) {
6078
authPayload = { type: 'connection_string', connectionString };
6179
}
6280
else {
6381
authPayload = { type: 'service_principal', tenantId, clientId, clientSecret, storageAccount };
6482
}
65-
const containerName = core.getInput('container_name');
66-
const sourceFolder = core.getInput('source_folder');
67-
const destinationFolder = core.getInput('destination_folder');
68-
const cleanDestinationPath = core.getInput('clean_destination_folder').toLowerCase() === 'true';
69-
const failIfSourceEmpty = core.getInput('fail_if_source_empty').toLowerCase() === 'true';
70-
const isRecursive = core.getInput('is_recursive').toLowerCase() === 'true';
71-
const deleteIfExists = core.getInput('delete_if_exists').toLowerCase() === 'false';
7283
// invoke this Action's main entry method
7384
await (0, methods_azure_1.UploadToAzure)({
7485
authPayload,

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "action-azure-upload-blob",
3-
"version": "3.4.0",
3+
"version": "3.5.0",
44
"private": false,
55
"description": "GitHub Acton that uploads file to Azure Storage blob container.",
66
"main": "lib/main.js",

0 commit comments

Comments
 (0)