@@ -43,32 +43,43 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
4343const core = __importStar(__nccwpck_require__(37484));
4444const methods_azure_1 = __nccwpck_require__(37940);
4545async 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,
0 commit comments