Export function

This commit is contained in:
rodelgc 2023-03-17 15:47:23 +08:00
parent d3928b6121
commit bcd9a7f9e7
1 changed files with 9 additions and 7 deletions

View File

@ -1,9 +1,11 @@
const { ALLURE_REPORT_DIR, ALLURE_RESULTS_DIR } = process.env;
module.exports = ( { core } ) => {
const { ALLURE_REPORT_DIR, ALLURE_RESULTS_DIR } = process.env;
if ( ! ( ALLURE_REPORT_DIR || ALLURE_RESULTS_DIR ) ) {
const errorMessage =
'You tried to use the "upload-allure-files-to-bucket" action without specifying the path to the allure-results and/or allure-report folders.\n' +
'To use this action, set the paths using the ALLURE_REPORT_DIR and ALLURE_RESULTS_DIR environment variables.';
if ( ! ( ALLURE_REPORT_DIR || ALLURE_RESULTS_DIR ) ) {
const errorMessage =
'You tried to use the "upload-allure-files-to-bucket" action without specifying the path to the allure-results and/or allure-report folders.\n' +
'To use this action, set the paths using the ALLURE_REPORT_DIR and ALLURE_RESULTS_DIR environment variables.';
core.setFailed( errorMessage );
}
core.setFailed( errorMessage );
}
};