@@ -3289,40 +3289,6 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls");
32893289
32903290module . exports = __WEBPACK_EXTERNAL_createRequire ( import . meta. url ) ( "util" ) ;
32913291
3292- /***/ } ) ,
3293-
3294- /***/ 633 :
3295- /***/ ( ( __webpack_module__ , __unused_webpack___webpack_exports__ , __nccwpck_require__ ) => {
3296-
3297- __nccwpck_require__ . a ( __webpack_module__ , async ( __webpack_handle_async_dependencies__ ) => {
3298- /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__ ( 186 ) ;
3299- /* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__ ( 514 ) ;
3300-
3301-
3302-
3303- await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec ( 'npm i -g firebase-tools' ) ;
3304-
3305- if ( ! process . env . FIREBASE_TOKEN ) {
3306- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'Oh... The FIREBASE_TOKEN is missing' ) ;
3307- }
3308-
3309- if ( ! process . env . FIREBASE_PROJECT ) {
3310- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'Oh... The FIREBASE_PROJECT is missing' ) ;
3311- }
3312-
3313- try {
3314- await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec (
3315- `firebase deploy -m ${ process . env . GITHUB_SHA } --project ${ process . env . FIREBASE_PROJECT } `
3316- ) ;
3317- } catch ( error ) {
3318- _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed (
3319- `Oh... An error occured while deploying to Firebase: ${ error } `
3320- ) ;
3321- }
3322-
3323- __webpack_handle_async_dependencies__ ( ) ;
3324- } , 1 ) ;
3325-
33263292/***/ } )
33273293
33283294/******/ } ) ;
@@ -3358,89 +3324,53 @@ __webpack_handle_async_dependencies__();
33583324/******/ }
33593325/******/
33603326/************************************************************************/
3361- /******/ /* webpack/runtime/async module */
3362- /******/ ( ( ) => {
3363- /******/ var webpackThen = typeof Symbol === "function" ? Symbol ( "webpack then" ) : "__webpack_then__" ;
3364- /******/ var webpackExports = typeof Symbol === "function" ? Symbol ( "webpack exports" ) : "__webpack_exports__" ;
3365- /******/ var completeQueue = ( queue ) => {
3366- /******/ if ( queue ) {
3367- /******/ queue . forEach ( ( fn ) => ( fn . r -- ) ) ;
3368- /******/ queue . forEach ( ( fn ) => ( fn . r -- ? fn . r ++ : fn ( ) ) ) ;
3369- /******/ }
3370- /******/ }
3371- /******/ var completeFunction = ( fn ) => ( ! -- fn . r && fn ( ) ) ;
3372- /******/ var queueFunction = ( queue , fn ) => ( queue ? queue . push ( fn ) : completeFunction ( fn ) ) ;
3373- /******/ var wrapDeps = ( deps ) => ( deps . map ( ( dep ) => {
3374- /******/ if ( dep !== null && typeof dep === "object" ) {
3375- /******/ if ( dep [ webpackThen ] ) return dep ;
3376- /******/ if ( dep . then ) {
3377- /******/ var queue = [ ] ;
3378- /******/ dep . then ( ( r ) => {
3379- /******/ obj [ webpackExports ] = r ;
3380- /******/ completeQueue ( queue ) ;
3381- /******/ queue = 0 ;
3382- /******/ } ) ;
3383- /******/ var obj = { } ;
3384- /******/ obj [ webpackThen ] = ( fn , reject ) => ( queueFunction ( queue , fn ) , dep [ 'catch' ] ( reject ) ) ;
3385- /******/ return obj ;
3386- /******/ }
3387- /******/ }
3388- /******/ var ret = { } ;
3389- /******/ ret [ webpackThen ] = ( fn ) => ( completeFunction ( fn ) ) ;
3390- /******/ ret [ webpackExports ] = dep ;
3391- /******/ return ret ;
3392- /******/ } ) ) ;
3393- /******/ __nccwpck_require__ . a = ( module , body , hasAwait ) => {
3394- /******/ var queue = hasAwait && [ ] ;
3395- /******/ var exports = module . exports ;
3396- /******/ var currentDeps ;
3397- /******/ var outerResolve ;
3398- /******/ var reject ;
3399- /******/ var isEvaluating = true ;
3400- /******/ var nested = false ;
3401- /******/ var whenAll = ( deps , onResolve , onReject ) => {
3402- /******/ if ( nested ) return ;
3403- /******/ nested = true ;
3404- /******/ onResolve . r += deps . length ;
3405- /******/ deps . map ( ( dep , i ) => ( dep [ webpackThen ] ( onResolve , onReject ) ) ) ;
3406- /******/ nested = false ;
3407- /******/ } ;
3408- /******/ var promise = new Promise ( ( resolve , rej ) => {
3409- /******/ reject = rej ;
3410- /******/ outerResolve = ( ) => ( resolve ( exports ) , completeQueue ( queue ) , queue = 0 ) ;
3411- /******/ } ) ;
3412- /******/ promise [ webpackExports ] = exports ;
3413- /******/ promise [ webpackThen ] = ( fn , rejectFn ) => {
3414- /******/ if ( isEvaluating ) { return completeFunction ( fn ) ; }
3415- /******/ if ( currentDeps ) whenAll ( currentDeps , fn , rejectFn ) ;
3416- /******/ queueFunction ( queue , fn ) ;
3417- /******/ promise [ 'catch' ] ( rejectFn ) ;
3418- /******/ } ;
3419- /******/ module . exports = promise ;
3420- /******/ body ( ( deps ) => {
3421- /******/ if ( ! deps ) return outerResolve ( ) ;
3422- /******/ currentDeps = wrapDeps ( deps ) ;
3423- /******/ var fn , result ;
3424- /******/ var promise = new Promise ( ( resolve , reject ) => {
3425- /******/ fn = ( ) => ( resolve ( result = currentDeps . map ( ( d ) => ( d [ webpackExports ] ) ) ) ) ;
3426- /******/ fn . r = 0 ;
3427- /******/ whenAll ( currentDeps , fn , reject ) ;
3428- /******/ } ) ;
3429- /******/ return fn . r ? promise : result ;
3430- /******/ } ) . then ( outerResolve , reject ) ;
3431- /******/ isEvaluating = false ;
3432- /******/ } ;
3433- /******/ } ) ( ) ;
3434- /******/
34353327/******/ /* webpack/runtime/compat */
34363328/******/
34373329/******/ if ( typeof __nccwpck_require__ !== 'undefined' ) __nccwpck_require__ . ab = new URL ( '.' , import . meta. url ) . pathname . slice ( import . meta. url . match ( / ^ f i l e : \/ \/ \/ \w : / ) ? 1 : 0 , - 1 ) + "/" ;
34383330/******/
34393331/************************************************************************/
3440- /******/
3441- /******/ // startup
3442- /******/ // Load entry module and return exports
3443- /******/ // This entry module used 'module' so it can't be inlined
3444- /******/ var __webpack_exports__ = __nccwpck_require__ ( 633 ) ;
3445- /******/ __webpack_exports__ = await __webpack_exports__ ;
3446- /******/
3332+ var __webpack_exports__ = { } ;
3333+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
3334+ ( ( ) => {
3335+ /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__ ( 186 ) ;
3336+ /* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__ ( 514 ) ;
3337+ // dependencies
3338+
3339+
3340+
3341+ const run = async ( ) => {
3342+ try {
3343+ // preflight check before starting the actions
3344+ const project = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'project' ) ;
3345+ if ( ! project ) {
3346+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'The Firebase project is missing from the worflow file' ) ;
3347+ return ;
3348+ }
3349+
3350+ if ( ! process . env . FIREBASE_TOKEN ) {
3351+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( 'The FIREBASE_TOKEN is missing' ) ;
3352+ return ;
3353+ }
3354+
3355+ // get if we receive a custom path for firebase.json
3356+ const config = _actions_core__WEBPACK_IMPORTED_MODULE_0__ . getInput ( 'config' ) ;
3357+
3358+ // installing firebase tools
3359+ await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec ( 'npm i -g firebase-tools' ) ;
3360+
3361+ // attempt to run firebase deploy, and throw an error if failed
3362+
3363+ await _actions_exec__WEBPACK_IMPORTED_MODULE_1__ . exec (
3364+ `firebase deploy -m ${ process . env . GITHUB_SHA } ${
3365+ config ? `--config ${ config } ` : ''
3366+ } --project ${ project } `
3367+ ) ;
3368+ } catch ( error ) {
3369+ _actions_core__WEBPACK_IMPORTED_MODULE_0__ . setFailed ( `An error occured while deploying to Firebase: ${ error } ` ) ;
3370+ }
3371+ } ;
3372+
3373+ run ( ) ;
3374+
3375+ } ) ( ) ;
3376+
0 commit comments