diff --git a/setup-install/dist/index.js b/setup-install/dist/index.js index fcf8050..2a937ca 100644 --- a/setup-install/dist/index.js +++ b/setup-install/dist/index.js @@ -58,7 +58,7 @@ ${e.format(t)} Error Message: ${n.message}`)})).result)===null||t===void 0?void 0:t.value;if(!i)throw new Error("Response json body do not have ID Token field");return i})}static getIDToken(e){return hl(this,void 0,void 0,function*(){try{let t=A.getIDTokenUrl();if(e){let s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,ll.debug)(`ID token url is ${t}`);let r=yield A.getCall(t);return(0,ll.setSecret)(r),r}catch(t){throw new Error(`Error message: ${t.message}`)}})}};br.OidcClient=_E});var zE=I(TA=>{"use strict";var XE=TA&&TA.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};Object.defineProperty(TA,"__esModule",{value:!0});TA.summary=TA.markdownSummary=TA.SUMMARY_DOCS_URL=TA.SUMMARY_ENV_VAR=void 0;var qF=require("os"),KE=require("fs"),{access:OF,appendFile:WF,writeFile:PF}=KE.promises;TA.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";TA.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var jE=class{constructor(){this._buffer=""}filePath(){return XE(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[TA.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${TA.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield OF(e,KE.constants.R_OK|KE.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,t,r={}){let s=Object.entries(r).map(([i,n])=>` ${i}="${n}"`).join("");return t?`<${e}${s}>${t}`:`<${e}${s}>`}write(e){return XE(this,void 0,void 0,function*(){let t=!!e?.overwrite,r=yield this.filePath();return yield(t?PF:WF)(r,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return XE(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,t=!1){return this._buffer+=e,t?this.addEOL():this}addEOL(){return this.addRaw(qF.EOL)}addCodeBlock(e,t){let r=Object.assign({},t&&{lang:t}),s=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(s).addEOL()}addList(e,t=!1){let r=t?"ol":"ul",s=e.map(n=>this.wrap("li",n)).join(""),i=this.wrap(r,s);return this.addRaw(i).addEOL()}addTable(e){let t=e.map(s=>{let i=s.map(n=>{if(typeof n=="string")return this.wrap("td",n);let{header:o,data:g,colspan:E,rowspan:Q}=n,a=o?"th":"td",c=Object.assign(Object.assign({},E&&{colspan:E}),Q&&{rowspan:Q});return this.wrap(a,g,c)}).join("");return this.wrap("tr",i)}).join(""),r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){let r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){let{width:s,height:i}=r||{},n=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i}),o=this.wrap("img",null,Object.assign({src:e,alt:t},n));return this.addRaw(o).addEOL()}addHeading(e,t){let r=`h${t}`,s=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1",i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){let r=Object.assign({},t&&{cite:t}),s=this.wrap("blockquote",e,r);return this.addRaw(s).addEOL()}addLink(e,t){let r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}},dl=new jE;TA.markdownSummary=dl;TA.summary=dl});var fl=I(vA=>{"use strict";var _F=vA&&vA.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(A,r,s)}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),ZF=vA&&vA.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),XF=vA&&vA.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.prototype.hasOwnProperty.call(A,t)&&_F(e,A,t);return ZF(e,A),e};Object.defineProperty(vA,"__esModule",{value:!0});vA.toPlatformPath=vA.toWin32Path=vA.toPosixPath=void 0;var KF=XF(require("path"));function jF(A){return A.replace(/[\\]/g,"/")}vA.toPosixPath=jF;function zF(A){return A.replace(/[/]/g,"\\")}vA.toWin32Path=zF;function $F(A){return A.replace(/[/\\]/g,KF.sep)}vA.toPlatformPath=$F});var AQ=I(p=>{"use strict";var AN=p&&p.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),eN=p&&p.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),wl=p&&p.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&AN(e,A,t);return eN(e,A),e},$E=p&&p.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})},HA;Object.defineProperty(p,"__esModule",{value:!0});p.getCmdPath=p.tryGetExecutablePath=p.isRooted=p.isDirectory=p.exists=p.READONLY=p.UV_FS_O_EXLOCK=p.IS_WINDOWS=p.unlink=p.symlink=p.stat=p.rmdir=p.rm=p.rename=p.readlink=p.readdir=p.open=p.mkdir=p.lstat=p.copyFile=p.chmod=void 0;var pl=wl(require("fs")),pn=wl(require("path"));HA=pl.promises,p.chmod=HA.chmod,p.copyFile=HA.copyFile,p.lstat=HA.lstat,p.mkdir=HA.mkdir,p.open=HA.open,p.readdir=HA.readdir,p.readlink=HA.readlink,p.rename=HA.rename,p.rm=HA.rm,p.rmdir=HA.rmdir,p.stat=HA.stat,p.symlink=HA.symlink,p.unlink=HA.unlink;p.IS_WINDOWS=process.platform==="win32";p.UV_FS_O_EXLOCK=268435456;p.READONLY=pl.constants.O_RDONLY;function tN(A){return $E(this,void 0,void 0,function*(){try{yield p.stat(A)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}p.exists=tN;function rN(A,e=!1){return $E(this,void 0,void 0,function*(){return(e?yield p.stat(A):yield p.lstat(A)).isDirectory()})}p.isDirectory=rN;function sN(A){if(A=nN(A),!A)throw new Error('isRooted() parameter "p" cannot be empty');return p.IS_WINDOWS?A.startsWith("\\")||/^[A-Z]:/i.test(A):A.startsWith("/")}p.isRooted=sN;function iN(A,e){return $E(this,void 0,void 0,function*(){let t;try{t=yield p.stat(A)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${s}`)}if(t&&t.isFile()){if(p.IS_WINDOWS){let s=pn.extname(A).toUpperCase();if(e.some(i=>i.toUpperCase()===s))return A}else if(yl(t))return A}let r=A;for(let s of e){A=r+s,t=void 0;try{t=yield p.stat(A)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${i}`)}if(t&&t.isFile()){if(p.IS_WINDOWS){try{let i=pn.dirname(A),n=pn.basename(A).toUpperCase();for(let o of yield p.readdir(i))if(n===o.toUpperCase()){A=pn.join(i,o);break}}catch(i){console.log(`Unexpected error attempting to determine the actual case of the file '${A}': ${i}`)}return A}else if(yl(t))return A}}return""})}p.tryGetExecutablePath=iN;function nN(A){return A=A||"",p.IS_WINDOWS?(A=A.replace(/\//g,"\\"),A.replace(/\\\\+/g,"\\")):A.replace(/\/\/+/g,"/")}function yl(A){return(A.mode&1)>0||(A.mode&8)>0&&A.gid===process.getgid()||(A.mode&64)>0&&A.uid===process.getuid()}function oN(){var A;return(A=process.env.COMSPEC)!==null&&A!==void 0?A:"cmd.exe"}p.getCmdPath=oN});var bl=I(sA=>{"use strict";var gN=sA&&sA.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),EN=sA&&sA.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),Dl=sA&&sA.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&gN(e,A,t);return EN(e,A),e},Ct=sA&&sA.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};Object.defineProperty(sA,"__esModule",{value:!0});sA.findInPath=sA.which=sA.mkdirP=sA.rmRF=sA.mv=sA.cp=void 0;var QN=require("assert"),Me=Dl(require("path")),V=Dl(AQ());function aN(A,e,t={}){return Ct(this,void 0,void 0,function*(){let{force:r,recursive:s,copySourceDirectory:i}=BN(t),n=(yield V.exists(e))?yield V.stat(e):null;if(n&&n.isFile()&&!r)return;let o=n&&n.isDirectory()&&i?Me.join(e,Me.basename(A)):e;if(!(yield V.exists(A)))throw new Error(`no such file or directory: ${A}`);if((yield V.stat(A)).isDirectory())if(s)yield Fl(A,o,0,r);else throw new Error(`Failed to copy. ${A} is a directory, but tried to copy without recursive flag.`);else{if(Me.relative(A,o)==="")throw new Error(`'${o}' and '${A}' are the same file`);yield Nl(A,o,r)}})}sA.cp=aN;function cN(A,e,t={}){return Ct(this,void 0,void 0,function*(){if(yield V.exists(e)){let r=!0;if((yield V.isDirectory(e))&&(e=Me.join(e,Me.basename(A)),r=yield V.exists(e)),r)if(t.force==null||t.force)yield Rl(e);else throw new Error("Destination already exists")}yield eQ(Me.dirname(e)),yield V.rename(A,e)})}sA.mv=cN;function Rl(A){return Ct(this,void 0,void 0,function*(){if(V.IS_WINDOWS&&/[*"<>|]/.test(A))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield V.rm(A,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}})}sA.rmRF=Rl;function eQ(A){return Ct(this,void 0,void 0,function*(){QN.ok(A,"a path argument must be provided"),yield V.mkdir(A,{recursive:!0})})}sA.mkdirP=eQ;function ml(A,e){return Ct(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");if(e){let r=yield ml(A,!1);if(!r)throw V.IS_WINDOWS?new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}let t=yield kl(A);return t&&t.length>0?t[0]:""})}sA.which=ml;function kl(A){return Ct(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");let e=[];if(V.IS_WINDOWS&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(Me.delimiter))s&&e.push(s);if(V.isRooted(A)){let s=yield V.tryGetExecutablePath(A,e);return s?[s]:[]}if(A.includes(Me.sep))return[];let t=[];if(process.env.PATH)for(let s of process.env.PATH.split(Me.delimiter))s&&t.push(s);let r=[];for(let s of t){let i=yield V.tryGetExecutablePath(Me.join(s,A),e);i&&r.push(i)}return r})}sA.findInPath=kl;function BN(A){let e=A.force==null?!0:A.force,t=!!A.recursive,r=A.copySourceDirectory==null?!0:!!A.copySourceDirectory;return{force:e,recursive:t,copySourceDirectory:r}}function Fl(A,e,t,r){return Ct(this,void 0,void 0,function*(){if(t>=255)return;t++,yield eQ(e);let s=yield V.readdir(A);for(let i of s){let n=`${A}/${i}`,o=`${e}/${i}`;(yield V.lstat(n)).isDirectory()?yield Fl(n,o,t,r):yield Nl(n,o,r)}yield V.chmod(e,(yield V.stat(A)).mode)})}function Nl(A,e,t){return Ct(this,void 0,void 0,function*(){if((yield V.lstat(A)).isSymbolicLink()){try{yield V.lstat(e),yield V.unlink(e)}catch(s){s.code==="EPERM"&&(yield V.chmod(e,"0666"),yield V.unlink(e))}let r=yield V.readlink(A);yield V.symlink(r,e,V.IS_WINDOWS?"junction":null)}else(!(yield V.exists(e))||t)&&(yield V.copyFile(A,e))})}});var Ml=I(VA=>{"use strict";var CN=VA&&VA.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),IN=VA&&VA.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),Sr=VA&&VA.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&CN(e,A,t);return IN(e,A),e},Sl=VA&&VA.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};Object.defineProperty(VA,"__esModule",{value:!0});VA.argStringToArray=VA.ToolRunner=void 0;var Dn=Sr(require("os")),Ll=Sr(require("events")),hN=Sr(require("child_process")),lN=Sr(require("path")),uN=Sr(bl()),Ul=Sr(AQ()),dN=require("timers"),Rn=process.platform==="win32",tQ=class extends Ll.EventEmitter{constructor(e,t,r){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){let r=this._getSpawnFileName(),s=this._getSpawnArgs(e),i=t?"":"[command]";if(Rn)if(this._isCmdFile()){i+=r;for(let n of s)i+=` ${n}`}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(let n of s)i+=` ${n}`}else{i+=this._windowsQuoteCmdArg(r);for(let n of s)i+=` ${this._windowsQuoteCmdArg(n)}`}else{i+=r;for(let n of s)i+=` ${n}`}return i}_processLineBuffer(e,t,r){try{let s=t+e.toString(),i=s.indexOf(Dn.EOL);for(;i>-1;){let n=s.substring(0,i);r(n),s=s.substring(i+Dn.EOL.length),i=s.indexOf(Dn.EOL)}return s}catch(s){return this._debug(`error processing line. Failed with error ${s}`),""}}_getSpawnFileName(){return Rn&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(Rn&&this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let t=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],r=!1;for(let n of e)if(t.some(o=>o===n)){r=!0;break}if(!r)return e;let s='"',i=!0;for(let n=e.length;n>0;n--)s+=e[n-1],i&&e[n-1]==="\\"?s+="\\":e[n-1]==='"'?(i=!0,s+='"'):i=!1;return s+='"',s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',r=!0;for(let s=e.length;s>0;s--)t+=e[s-1],r&&e[s-1]==="\\"?t+="\\":e[s-1]==='"'?(r=!0,t+="\\"):r=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){e=e||{};let r={};return r.cwd=e.cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return Sl(this,void 0,void 0,function*(){return!Ul.isRooted(this.toolPath)&&(this.toolPath.includes("/")||Rn&&this.toolPath.includes("\\"))&&(this.toolPath=lN.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield uN.which(this.toolPath,!0),new Promise((e,t)=>Sl(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let E of this.args)this._debug(` ${E}`);let r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+Dn.EOL);let s=new rQ(r,this.toolPath);if(s.on("debug",E=>{this._debug(E)}),this.options.cwd&&!(yield Ul.exists(this.options.cwd)))return t(new Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),n=hN.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i)),o="";n.stdout&&n.stdout.on("data",E=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(E),!r.silent&&r.outStream&&r.outStream.write(E),o=this._processLineBuffer(E,o,Q=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(Q)})});let g="";if(n.stderr&&n.stderr.on("data",E=>{s.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(E),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(E),g=this._processLineBuffer(E,g,Q=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(Q)})}),n.on("error",E=>{s.processError=E.message,s.processExited=!0,s.processClosed=!0,s.CheckComplete()}),n.on("exit",E=>{s.processExitCode=E,s.processExited=!0,this._debug(`Exit code ${E} received from tool '${this.toolPath}'`),s.CheckComplete()}),n.on("close",E=>{s.processExitCode=E,s.processExited=!0,s.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),s.CheckComplete()}),s.on("done",(E,Q)=>{o.length>0&&this.emit("stdline",o),g.length>0&&this.emit("errline",g),n.removeAllListeners(),E?t(E):e(Q)}),this.options.input){if(!n.stdin)throw new Error("child process missing stdin");n.stdin.end(this.options.input)}}))})}};VA.ToolRunner=tQ;function fN(A){let e=[],t=!1,r=!1,s="";function i(n){r&&n!=='"'&&(s+="\\"),s+=n,r=!1}for(let n=0;n0&&(e.push(s),s="");continue}i(o)}return s.length>0&&e.push(s.trim()),e}VA.argStringToArray=fN;var rQ=class A extends Ll.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=dN.setTimeout(A.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}}});var Tl=I(qA=>{"use strict";var yN=qA&&qA.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),wN=qA&&qA.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),pN=qA&&qA.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&yN(e,A,t);return wN(e,A),e},Jl=qA&&qA.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};Object.defineProperty(qA,"__esModule",{value:!0});qA.getExecOutput=qA.exec=void 0;var xl=require("string_decoder"),Yl=pN(Ml());function Gl(A,e,t){return Jl(this,void 0,void 0,function*(){let r=Yl.argStringToArray(A);if(r.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let s=r[0];return e=r.slice(1).concat(e||[]),new Yl.ToolRunner(s,e,t).exec()})}qA.exec=Gl;function DN(A,e,t){var r,s;return Jl(this,void 0,void 0,function*(){let i="",n="",o=new xl.StringDecoder("utf8"),g=new xl.StringDecoder("utf8"),E=(r=t?.listeners)===null||r===void 0?void 0:r.stdout,Q=(s=t?.listeners)===null||s===void 0?void 0:s.stderr,a=u=>{n+=g.write(u),Q&&Q(u)},c=u=>{i+=o.write(u),E&&E(u)},C=Object.assign(Object.assign({},t?.listeners),{stdout:c,stderr:a}),B=yield Gl(A,e,Object.assign(Object.assign({},t),{listeners:C}));return i+=o.end(),n+=g.end(),{exitCode:B,stdout:i,stderr:n}})}qA.getExecOutput=DN});var Hl=I(G=>{"use strict";var RN=G&&G.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(A,r,s)}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),mN=G&&G.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),kN=G&&G.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.prototype.hasOwnProperty.call(A,t)&&RN(e,A,t);return mN(e,A),e},kn=G&&G.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})},FN=G&&G.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(G,"__esModule",{value:!0});G.getDetails=G.isLinux=G.isMacOS=G.isWindows=G.arch=G.platform=void 0;var vl=FN(require("os")),mn=kN(Tl()),NN=()=>kn(void 0,void 0,void 0,function*(){let{stdout:A}=yield mn.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:e}=yield mn.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:e.trim(),version:A.trim()}}),bN=()=>kn(void 0,void 0,void 0,function*(){var A,e,t,r;let{stdout:s}=yield mn.getExecOutput("sw_vers",void 0,{silent:!0}),i=(e=(A=s.match(/ProductVersion:\s*(.+)/))===null||A===void 0?void 0:A[1])!==null&&e!==void 0?e:"";return{name:(r=(t=s.match(/ProductName:\s*(.+)/))===null||t===void 0?void 0:t[1])!==null&&r!==void 0?r:"",version:i}}),SN=()=>kn(void 0,void 0,void 0,function*(){let{stdout:A}=yield mn.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[e,t]=A.trim().split(` `);return{name:e,version:t}});G.platform=vl.default.platform();G.arch=vl.default.arch();G.isWindows=G.platform==="win32";G.isMacOS=G.platform==="darwin";G.isLinux=G.platform==="linux";function UN(){return kn(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield G.isWindows?NN():G.isMacOS?bN():SN()),{platform:G.platform,arch:G.arch,isWindows:G.isWindows,isMacOS:G.isMacOS,isLinux:G.isLinux})})}G.getDetails=UN});var ZE=I(w=>{"use strict";var LN=w&&w.__createBinding||(Object.create?(function(A,e,t,r){r===void 0&&(r=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(A,r,s)}):(function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]})),MN=w&&w.__setModuleDefault||(Object.create?(function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}):function(A,e){A.default=e}),iQ=w&&w.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.prototype.hasOwnProperty.call(A,t)&&LN(e,A,t);return MN(e,A),e},Vl=w&&w.__awaiter||function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};Object.defineProperty(w,"__esModule",{value:!0});w.platform=w.toPlatformPath=w.toWin32Path=w.toPosixPath=w.markdownSummary=w.summary=w.getIDToken=w.getState=w.saveState=w.group=w.endGroup=w.startGroup=w.info=w.notice=w.warning=w.error=w.debug=w.isDebug=w.setFailed=w.setCommandEcho=w.setOutput=w.getBooleanInput=w.getMultilineInput=w.getInput=w.addPath=w.setSecret=w.exportVariable=w.ExitCode=void 0;var Be=lQ(),Yt=fQ(),Ur=Fs(),ql=iQ(require("os")),xN=iQ(require("path")),YN=ul(),sQ;(function(A){A[A.Success=0]="Success",A[A.Failure=1]="Failure"})(sQ||(w.ExitCode=sQ={}));function JN(A,e){let t=(0,Ur.toCommandValue)(e);if(process.env[A]=t,process.env.GITHUB_ENV||"")return(0,Yt.issueFileCommand)("ENV",(0,Yt.prepareKeyValueMessage)(A,e));(0,Be.issueCommand)("set-env",{name:A},t)}w.exportVariable=JN;function GN(A){(0,Be.issueCommand)("add-mask",{},A)}w.setSecret=GN;function TN(A){process.env.GITHUB_PATH||""?(0,Yt.issueFileCommand)("PATH",A):(0,Be.issueCommand)("add-path",{},A),process.env.PATH=`${A}${xN.delimiter}${process.env.PATH}`}w.addPath=TN;function nQ(A,e){let t=process.env[`INPUT_${A.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!t)throw new Error(`Input required and not supplied: ${A}`);return e&&e.trimWhitespace===!1?t:t.trim()}w.getInput=nQ;function vN(A,e){let t=nQ(A,e).split(` `).filter(r=>r!=="");return e&&e.trimWhitespace===!1?t:t.map(r=>r.trim())}w.getMultilineInput=vN;function HN(A,e){let t=["true","True","TRUE"],r=["false","False","FALSE"],s=nQ(A,e);if(t.includes(s))return!0;if(r.includes(s))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${A} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}w.getBooleanInput=HN;function VN(A,e){if(process.env.GITHUB_OUTPUT||"")return(0,Yt.issueFileCommand)("OUTPUT",(0,Yt.prepareKeyValueMessage)(A,e));process.stdout.write(ql.EOL),(0,Be.issueCommand)("set-output",{name:A},(0,Ur.toCommandValue)(e))}w.setOutput=VN;function qN(A){(0,Be.issue)("echo",A?"on":"off")}w.setCommandEcho=qN;function ON(A){process.exitCode=sQ.Failure,Ol(A)}w.setFailed=ON;function WN(){return process.env.RUNNER_DEBUG==="1"}w.isDebug=WN;function PN(A){(0,Be.issueCommand)("debug",{},A)}w.debug=PN;function Ol(A,e={}){(0,Be.issueCommand)("error",(0,Ur.toCommandProperties)(e),A instanceof Error?A.toString():A)}w.error=Ol;function _N(A,e={}){(0,Be.issueCommand)("warning",(0,Ur.toCommandProperties)(e),A instanceof Error?A.toString():A)}w.warning=_N;function ZN(A,e={}){(0,Be.issueCommand)("notice",(0,Ur.toCommandProperties)(e),A instanceof Error?A.toString():A)}w.notice=ZN;function XN(A){process.stdout.write(A+ql.EOL)}w.info=XN;function Wl(A){(0,Be.issue)("group",A)}w.startGroup=Wl;function Pl(){(0,Be.issue)("endgroup")}w.endGroup=Pl;function KN(A,e){return Vl(this,void 0,void 0,function*(){Wl(A);let t;try{t=yield e()}finally{Pl()}return t})}w.group=KN;function jN(A,e){if(process.env.GITHUB_STATE||"")return(0,Yt.issueFileCommand)("STATE",(0,Yt.prepareKeyValueMessage)(A,e));(0,Be.issueCommand)("save-state",{name:A},(0,Ur.toCommandValue)(e))}w.saveState=jN;function zN(A){return process.env[`STATE_${A}`]||""}w.getState=zN;function $N(A){return Vl(this,void 0,void 0,function*(){return yield YN.OidcClient.getIDToken(A)})}w.getIDToken=$N;var Ab=zE();Object.defineProperty(w,"summary",{enumerable:!0,get:function(){return Ab.summary}});var eb=zE();Object.defineProperty(w,"markdownSummary",{enumerable:!0,get:function(){return eb.markdownSummary}});var oQ=fl();Object.defineProperty(w,"toPosixPath",{enumerable:!0,get:function(){return oQ.toPosixPath}});Object.defineProperty(w,"toWin32Path",{enumerable:!0,get:function(){return oQ.toWin32Path}});Object.defineProperty(w,"toPlatformPath",{enumerable:!0,get:function(){return oQ.toPlatformPath}});w.platform=iQ(Hl())});var ub={};cu(ub,{run:()=>iu});module.exports=Bu(ub);var Ye=Ge(ZE());var ps=Ge(require("os"),1),cQ=Ge(require("events"),1),$l=Ge(require("child_process"),1),Au=Ge(require("path"),1);var xe=Ge(require("path"),1);var Nn=Ge(require("fs"),1),It=Ge(require("path"),1),Zl=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})},{chmod:tb,copyFile:rb,lstat:sb,mkdir:ib,open:NU,readdir:Xl,rename:nb,rm:ob,rmdir:bU,stat:Fn,symlink:gb,unlink:Eb}=Nn.promises,Jt=process.platform==="win32";var SU=Nn.constants.O_RDONLY;function gQ(A){return Zl(this,void 0,void 0,function*(){try{yield Fn(A)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}function bn(A){if(A=Qb(A),!A)throw new Error('isRooted() parameter "p" cannot be empty');return Jt?A.startsWith("\\")||/^[A-Z]:/i.test(A):A.startsWith("/")}function EQ(A,e){return Zl(this,void 0,void 0,function*(){let t;try{t=yield Fn(A)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${s}`)}if(t&&t.isFile()){if(Jt){let s=It.extname(A).toUpperCase();if(e.some(i=>i.toUpperCase()===s))return A}else if(_l(t))return A}let r=A;for(let s of e){A=r+s,t=void 0;try{t=yield Fn(A)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${i}`)}if(t&&t.isFile()){if(Jt){try{let i=It.dirname(A),n=It.basename(A).toUpperCase();for(let o of yield Xl(i))if(n===o.toUpperCase()){A=It.join(i,o);break}}catch(i){console.log(`Unexpected error attempting to determine the actual case of the file '${A}': ${i}`)}return A}else if(_l(t))return A}}return""})}function Qb(A){return A=A||"",Jt?(A=A.replace(/\//g,"\\"),A.replace(/\\\\+/g,"\\")):A.replace(/\/\/+/g,"/")}function _l(A){return(A.mode&1)>0||(A.mode&8)>0&&process.getgid!==void 0&&A.gid===process.getgid()||(A.mode&64)>0&&process.getuid!==void 0&&A.uid===process.getuid()}var jl=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};function QQ(A,e){return jl(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");if(e){let r=yield QQ(A,!1);if(!r)throw Jt?new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}let t=yield ab(A);return t&&t.length>0?t[0]:""})}function ab(A){return jl(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");let e=[];if(Jt&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(xe.delimiter))s&&e.push(s);if(bn(A)){let s=yield EQ(A,e);return s?[s]:[]}if(A.includes(xe.sep))return[];let t=[];if(process.env.PATH)for(let s of process.env.PATH.split(xe.delimiter))s&&t.push(s);let r=[];for(let s of t){let i=yield EQ(xe.join(s,A),e);i&&r.push(i)}return r})}var eu=require("timers"),zl=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})},Sn=process.platform==="win32",Un=class extends cQ.EventEmitter{constructor(e,t,r){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){let r=this._getSpawnFileName(),s=this._getSpawnArgs(e),i=t?"":"[command]";if(Sn)if(this._isCmdFile()){i+=r;for(let n of s)i+=` ${n}`}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(let n of s)i+=` ${n}`}else{i+=this._windowsQuoteCmdArg(r);for(let n of s)i+=` ${this._windowsQuoteCmdArg(n)}`}else{i+=r;for(let n of s)i+=` ${n}`}return i}_processLineBuffer(e,t,r){try{let s=t+e.toString(),i=s.indexOf(ps.EOL);for(;i>-1;){let n=s.substring(0,i);r(n),s=s.substring(i+ps.EOL.length),i=s.indexOf(ps.EOL)}return s}catch(s){return this._debug(`error processing line. Failed with error ${s}`),""}}_getSpawnFileName(){return Sn&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(Sn&&this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let t=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],r=!1;for(let n of e)if(t.some(o=>o===n)){r=!0;break}if(!r)return e;let s='"',i=!0;for(let n=e.length;n>0;n--)s+=e[n-1],i&&e[n-1]==="\\"?s+="\\":e[n-1]==='"'?(i=!0,s+='"'):i=!1;return s+='"',s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',r=!0;for(let s=e.length;s>0;s--)t+=e[s-1],r&&e[s-1]==="\\"?t+="\\":e[s-1]==='"'?(r=!0,t+="\\"):r=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){e=e||{};let r={};return r.cwd=e.cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return zl(this,void 0,void 0,function*(){return!bn(this.toolPath)&&(this.toolPath.includes("/")||Sn&&this.toolPath.includes("\\"))&&(this.toolPath=Au.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield QQ(this.toolPath,!0),new Promise((e,t)=>zl(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let E of this.args)this._debug(` ${E}`);let r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+ps.EOL);let s=new aQ(r,this.toolPath);if(s.on("debug",E=>{this._debug(E)}),this.options.cwd&&!(yield gQ(this.options.cwd)))return t(new Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),n=$l.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i)),o="";n.stdout&&n.stdout.on("data",E=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(E),!r.silent&&r.outStream&&r.outStream.write(E),o=this._processLineBuffer(E,o,Q=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(Q)})});let g="";if(n.stderr&&n.stderr.on("data",E=>{s.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(E),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(E),g=this._processLineBuffer(E,g,Q=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(Q)})}),n.on("error",E=>{s.processError=E.message,s.processExited=!0,s.processClosed=!0,s.CheckComplete()}),n.on("exit",E=>{s.processExitCode=E,s.processExited=!0,this._debug(`Exit code ${E} received from tool '${this.toolPath}'`),s.CheckComplete()}),n.on("close",E=>{s.processExitCode=E,s.processExited=!0,s.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),s.CheckComplete()}),s.on("done",(E,Q)=>{o.length>0&&this.emit("stdline",o),g.length>0&&this.emit("errline",g),n.removeAllListeners(),E?t(E):e(Q)}),this.options.input){if(!n.stdin)throw new Error("child process missing stdin");n.stdin.end(this.options.input)}}))})}};function tu(A){let e=[],t=!1,r=!1,s="";function i(n){r&&n!=='"'&&(s+="\\"),s+=n,r=!1}for(let n=0;n0&&(e.push(s),s="");continue}i(o)}return s.length>0&&e.push(s.trim()),e}var aQ=class A extends cQ.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=(0,eu.setTimeout)(A.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}};var Cb=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};function Ds(A,e,t){return Cb(this,void 0,void 0,function*(){let r=tu(A);if(r.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let s=r[0];return e=r.slice(1).concat(e||[]),new Un(s,e,t).exec()})}var Ln=Ge(require("path"));var hb=["--base-url=http://localhost/","--admin-user=admin","--admin-password=admin123","--admin-email=admin@example.com","--admin-firstname=Admin","--admin-lastname=User","--backend-frontname=admin"],Lr=(A,e,t)=>A?.ports?.[0]?.split(":")[e]??t,ru=A=>{let e=A.env?.MYSQL_ROOT_PASSWORD??"rootpassword";return["-h127.0.0.1",`--port=${Lr(A,0,"3306")}`,"-uroot",`-p${e}`,"-e","SET GLOBAL log_bin_trust_function_creators = 1;"]},su=(A,e=!1)=>{let t=[...hb];if(!A)return t;let r=e?1:0,s=i=>e?i:"localhost";if(A.mysql){let i=Lr(A.mysql,r,"3306"),n=e?`mysql:${i}`:`127.0.0.1:${i}`;t.push(`--db-host=${n}`,`--db-name=${A.mysql.env?.MYSQL_DATABASE??"magento"}`,`--db-user=${A.mysql.env?.MYSQL_USER??"magento"}`,`--db-password=${A.mysql.env?.MYSQL_PASSWORD??"magento"}`)}if(A.opensearch){let i=Lr(A.opensearch,r,"9200");t.push("--search-engine=opensearch",`--opensearch-host=${s("opensearch")}`,`--opensearch-port=${i}`)}else if(A.elasticsearch){let i=A.elasticsearch.image.split(":")[1]?.split(".")[0],n=Lr(A.elasticsearch,r,"9200");t.push(`--search-engine=elasticsearch${i}`,`--elasticsearch-host=${s("elasticsearch")}`,`--elasticsearch-port=${n}`)}if(A.rabbitmq){let i=Lr(A.rabbitmq,r,"5672");t.push(`--amqp-host=${s("rabbitmq")}`,`--amqp-port=${i}`,"--amqp-user=guest","--amqp-password=guest")}if(A.valkey||A.redis){let i=A.valkey?"valkey":"redis",n=A[i],o=Lr(n,r,"6379"),g=s(i);t.push("--session-save=redis",`--session-save-redis-host=${g}`,`--session-save-redis-port=${o}`,"--cache-backend=redis",`--cache-backend-redis-server=${g}`,`--cache-backend-redis-port=${o}`)}return t};var lb=A=>{let e=process.env.GITHUB_WORKSPACE||"",t=Ln.resolve(e,A),r=Ln.relative(e,t);if(r.startsWith(".."))throw new Error(`container_id: path ${A} resolves outside GITHUB_WORKSPACE (${e})`);return r?`/var/www/html/${r}`:"/var/www/html"};async function iu(){try{let A=Ye.getInput("services"),e=Ye.getInput("path")||".",t=Ye.getInput("extra_args").trim(),r=Ye.getInput("container_id").trim(),s=r!=="",i=null;A&&A!=="null"&&(i=JSON.parse(A)),i?.mysql&&await Ds("mysql",ru(i.mysql));let n=su(i,s);if(t&&n.push(...t.split(/\s+/)),s){let o=lb(e),g=`docker exec -w ${o} ${r} php bin/magento setup:install ${n.join(" ")}`;Ye.setOutput("command",g),await Ds("docker",["exec","-w",o,r,"php","bin/magento","setup:install",...n]),await Ds("docker",["exec",r,"sh","-c",`for d in var generated pub/static pub/media; do [ -d "${o}/$d" ] && chown -R www-data:www-data "${o}/$d"; done`])}else Ye.setOutput("command",`php bin/magento setup:install ${n.join(" ")}`),await Ds("php",["bin/magento","setup:install",...n],{cwd:e})}catch(A){Ye.setFailed(A.message)}}iu();0&&(module.exports={run}); +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}w.getBooleanInput=HN;function VN(A,e){if(process.env.GITHUB_OUTPUT||"")return(0,Yt.issueFileCommand)("OUTPUT",(0,Yt.prepareKeyValueMessage)(A,e));process.stdout.write(ql.EOL),(0,Be.issueCommand)("set-output",{name:A},(0,Ur.toCommandValue)(e))}w.setOutput=VN;function qN(A){(0,Be.issue)("echo",A?"on":"off")}w.setCommandEcho=qN;function ON(A){process.exitCode=sQ.Failure,Ol(A)}w.setFailed=ON;function WN(){return process.env.RUNNER_DEBUG==="1"}w.isDebug=WN;function PN(A){(0,Be.issueCommand)("debug",{},A)}w.debug=PN;function Ol(A,e={}){(0,Be.issueCommand)("error",(0,Ur.toCommandProperties)(e),A instanceof Error?A.toString():A)}w.error=Ol;function _N(A,e={}){(0,Be.issueCommand)("warning",(0,Ur.toCommandProperties)(e),A instanceof Error?A.toString():A)}w.warning=_N;function ZN(A,e={}){(0,Be.issueCommand)("notice",(0,Ur.toCommandProperties)(e),A instanceof Error?A.toString():A)}w.notice=ZN;function XN(A){process.stdout.write(A+ql.EOL)}w.info=XN;function Wl(A){(0,Be.issue)("group",A)}w.startGroup=Wl;function Pl(){(0,Be.issue)("endgroup")}w.endGroup=Pl;function KN(A,e){return Vl(this,void 0,void 0,function*(){Wl(A);let t;try{t=yield e()}finally{Pl()}return t})}w.group=KN;function jN(A,e){if(process.env.GITHUB_STATE||"")return(0,Yt.issueFileCommand)("STATE",(0,Yt.prepareKeyValueMessage)(A,e));(0,Be.issueCommand)("save-state",{name:A},(0,Ur.toCommandValue)(e))}w.saveState=jN;function zN(A){return process.env[`STATE_${A}`]||""}w.getState=zN;function $N(A){return Vl(this,void 0,void 0,function*(){return yield YN.OidcClient.getIDToken(A)})}w.getIDToken=$N;var Ab=zE();Object.defineProperty(w,"summary",{enumerable:!0,get:function(){return Ab.summary}});var eb=zE();Object.defineProperty(w,"markdownSummary",{enumerable:!0,get:function(){return eb.markdownSummary}});var oQ=fl();Object.defineProperty(w,"toPosixPath",{enumerable:!0,get:function(){return oQ.toPosixPath}});Object.defineProperty(w,"toWin32Path",{enumerable:!0,get:function(){return oQ.toWin32Path}});Object.defineProperty(w,"toPlatformPath",{enumerable:!0,get:function(){return oQ.toPlatformPath}});w.platform=iQ(Hl())});var ub={};cu(ub,{run:()=>iu});module.exports=Bu(ub);var Ye=Ge(ZE());var ps=Ge(require("os"),1),cQ=Ge(require("events"),1),$l=Ge(require("child_process"),1),Au=Ge(require("path"),1);var xe=Ge(require("path"),1);var Nn=Ge(require("fs"),1),It=Ge(require("path"),1),Zl=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})},{chmod:tb,copyFile:rb,lstat:sb,mkdir:ib,open:NU,readdir:Xl,rename:nb,rm:ob,rmdir:bU,stat:Fn,symlink:gb,unlink:Eb}=Nn.promises,Jt=process.platform==="win32";var SU=Nn.constants.O_RDONLY;function gQ(A){return Zl(this,void 0,void 0,function*(){try{yield Fn(A)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}function bn(A){if(A=Qb(A),!A)throw new Error('isRooted() parameter "p" cannot be empty');return Jt?A.startsWith("\\")||/^[A-Z]:/i.test(A):A.startsWith("/")}function EQ(A,e){return Zl(this,void 0,void 0,function*(){let t;try{t=yield Fn(A)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${s}`)}if(t&&t.isFile()){if(Jt){let s=It.extname(A).toUpperCase();if(e.some(i=>i.toUpperCase()===s))return A}else if(_l(t))return A}let r=A;for(let s of e){A=r+s,t=void 0;try{t=yield Fn(A)}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${A}': ${i}`)}if(t&&t.isFile()){if(Jt){try{let i=It.dirname(A),n=It.basename(A).toUpperCase();for(let o of yield Xl(i))if(n===o.toUpperCase()){A=It.join(i,o);break}}catch(i){console.log(`Unexpected error attempting to determine the actual case of the file '${A}': ${i}`)}return A}else if(_l(t))return A}}return""})}function Qb(A){return A=A||"",Jt?(A=A.replace(/\//g,"\\"),A.replace(/\\\\+/g,"\\")):A.replace(/\/\/+/g,"/")}function _l(A){return(A.mode&1)>0||(A.mode&8)>0&&process.getgid!==void 0&&A.gid===process.getgid()||(A.mode&64)>0&&process.getuid!==void 0&&A.uid===process.getuid()}var jl=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};function QQ(A,e){return jl(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");if(e){let r=yield QQ(A,!1);if(!r)throw Jt?new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${A}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return r}let t=yield ab(A);return t&&t.length>0?t[0]:""})}function ab(A){return jl(this,void 0,void 0,function*(){if(!A)throw new Error("parameter 'tool' is required");let e=[];if(Jt&&process.env.PATHEXT)for(let s of process.env.PATHEXT.split(xe.delimiter))s&&e.push(s);if(bn(A)){let s=yield EQ(A,e);return s?[s]:[]}if(A.includes(xe.sep))return[];let t=[];if(process.env.PATH)for(let s of process.env.PATH.split(xe.delimiter))s&&t.push(s);let r=[];for(let s of t){let i=yield EQ(xe.join(s,A),e);i&&r.push(i)}return r})}var eu=require("timers"),zl=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})},Sn=process.platform==="win32",Un=class extends cQ.EventEmitter{constructor(e,t,r){if(super(),!e)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=e,this.args=t||[],this.options=r||{}}_debug(e){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(e)}_getCommandString(e,t){let r=this._getSpawnFileName(),s=this._getSpawnArgs(e),i=t?"":"[command]";if(Sn)if(this._isCmdFile()){i+=r;for(let n of s)i+=` ${n}`}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(let n of s)i+=` ${n}`}else{i+=this._windowsQuoteCmdArg(r);for(let n of s)i+=` ${this._windowsQuoteCmdArg(n)}`}else{i+=r;for(let n of s)i+=` ${n}`}return i}_processLineBuffer(e,t,r){try{let s=t+e.toString(),i=s.indexOf(ps.EOL);for(;i>-1;){let n=s.substring(0,i);r(n),s=s.substring(i+ps.EOL.length),i=s.indexOf(ps.EOL)}return s}catch(s){return this._debug(`error processing line. Failed with error ${s}`),""}}_getSpawnFileName(){return Sn&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(Sn&&this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let r of this.args)t+=" ",t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r);return t+='"',[t]}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){let e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile())return this._uvQuoteCmdArg(e);if(!e)return'""';let t=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],r=!1;for(let n of e)if(t.some(o=>o===n)){r=!0;break}if(!r)return e;let s='"',i=!0;for(let n=e.length;n>0;n--)s+=e[n-1],i&&e[n-1]==="\\"?s+="\\":e[n-1]==='"'?(i=!0,s+='"'):i=!1;return s+='"',s.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e)return'""';if(!e.includes(" ")&&!e.includes(" ")&&!e.includes('"'))return e;if(!e.includes('"')&&!e.includes("\\"))return`"${e}"`;let t='"',r=!0;for(let s=e.length;s>0;s--)t+=e[s-1],r&&e[s-1]==="\\"?t+="\\":e[s-1]==='"'?(r=!0,t+="\\"):r=!1;return t+='"',t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};let t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||!1,windowsVerbatimArguments:e.windowsVerbatimArguments||!1,failOnStdErr:e.failOnStdErr||!1,ignoreReturnCode:e.ignoreReturnCode||!1,delay:e.delay||1e4};return t.outStream=e.outStream||process.stdout,t.errStream=e.errStream||process.stderr,t}_getSpawnOptions(e,t){e=e||{};let r={};return r.cwd=e.cwd,r.env=e.env,r.windowsVerbatimArguments=e.windowsVerbatimArguments||this._isCmdFile(),e.windowsVerbatimArguments&&(r.argv0=`"${t}"`),r}exec(){return zl(this,void 0,void 0,function*(){return!bn(this.toolPath)&&(this.toolPath.includes("/")||Sn&&this.toolPath.includes("\\"))&&(this.toolPath=Au.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield QQ(this.toolPath,!0),new Promise((e,t)=>zl(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let E of this.args)this._debug(` ${E}`);let r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+ps.EOL);let s=new aQ(r,this.toolPath);if(s.on("debug",E=>{this._debug(E)}),this.options.cwd&&!(yield gQ(this.options.cwd)))return t(new Error(`The cwd: ${this.options.cwd} does not exist!`));let i=this._getSpawnFileName(),n=$l.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i)),o="";n.stdout&&n.stdout.on("data",E=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(E),!r.silent&&r.outStream&&r.outStream.write(E),o=this._processLineBuffer(E,o,Q=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(Q)})});let g="";if(n.stderr&&n.stderr.on("data",E=>{s.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(E),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(E),g=this._processLineBuffer(E,g,Q=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(Q)})}),n.on("error",E=>{s.processError=E.message,s.processExited=!0,s.processClosed=!0,s.CheckComplete()}),n.on("exit",E=>{s.processExitCode=E,s.processExited=!0,this._debug(`Exit code ${E} received from tool '${this.toolPath}'`),s.CheckComplete()}),n.on("close",E=>{s.processExitCode=E,s.processExited=!0,s.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),s.CheckComplete()}),s.on("done",(E,Q)=>{o.length>0&&this.emit("stdline",o),g.length>0&&this.emit("errline",g),n.removeAllListeners(),E?t(E):e(Q)}),this.options.input){if(!n.stdin)throw new Error("child process missing stdin");n.stdin.end(this.options.input)}}))})}};function tu(A){let e=[],t=!1,r=!1,s="";function i(n){r&&n!=='"'&&(s+="\\"),s+=n,r=!1}for(let n=0;n0&&(e.push(s),s="");continue}i(o)}return s.length>0&&e.push(s.trim()),e}var aQ=class A extends cQ.EventEmitter{constructor(e,t){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!t)throw new Error("toolPath must not be empty");this.options=e,this.toolPath=t,e.delay&&(this.delay=e.delay)}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=(0,eu.setTimeout)(A.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(!e.done){if(!e.processClosed&&e.processExited){let t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}};var Cb=function(A,e,t,r){function s(i){return i instanceof t?i:new t(function(n){n(i)})}return new(t||(t=Promise))(function(i,n){function o(Q){try{E(r.next(Q))}catch(a){n(a)}}function g(Q){try{E(r.throw(Q))}catch(a){n(a)}}function E(Q){Q.done?i(Q.value):s(Q.value).then(o,g)}E((r=r.apply(A,e||[])).next())})};function Ds(A,e,t){return Cb(this,void 0,void 0,function*(){let r=tu(A);if(r.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let s=r[0];return e=r.slice(1).concat(e||[]),new Un(s,e,t).exec()})}var Ln=Ge(require("path"));var hb=["--base-url=http://localhost/","--admin-user=admin","--admin-password=admin123","--admin-email=admin@example.com","--admin-firstname=Admin","--admin-lastname=User","--backend-frontname=admin","--no-interaction"],Lr=(A,e,t)=>A?.ports?.[0]?.split(":")[e]??t,ru=A=>{let e=A.env?.MYSQL_ROOT_PASSWORD??"rootpassword";return["-h127.0.0.1",`--port=${Lr(A,0,"3306")}`,"-uroot",`-p${e}`,"-e","SET GLOBAL log_bin_trust_function_creators = 1;"]},su=(A,e=!1)=>{let t=[...hb];if(!A)return t;let r=e?1:0,s=i=>e?i:"localhost";if(A.mysql){let i=Lr(A.mysql,r,"3306"),n=e?`mysql:${i}`:`127.0.0.1:${i}`;t.push(`--db-host=${n}`,`--db-name=${A.mysql.env?.MYSQL_DATABASE??"magento"}`,`--db-user=${A.mysql.env?.MYSQL_USER??"magento"}`,`--db-password=${A.mysql.env?.MYSQL_PASSWORD??"magento"}`)}if(A.opensearch){let i=Lr(A.opensearch,r,"9200");t.push("--search-engine=opensearch",`--opensearch-host=${s("opensearch")}`,`--opensearch-port=${i}`)}else if(A.elasticsearch){let i=A.elasticsearch.image.split(":")[1]?.split(".")[0],n=Lr(A.elasticsearch,r,"9200");t.push(`--search-engine=elasticsearch${i}`,`--elasticsearch-host=${s("elasticsearch")}`,`--elasticsearch-port=${n}`)}if(A.rabbitmq){let i=Lr(A.rabbitmq,r,"5672");t.push(`--amqp-host=${s("rabbitmq")}`,`--amqp-port=${i}`,"--amqp-user=guest","--amqp-password=guest")}if(A.valkey||A.redis){let i=A.valkey?"valkey":"redis",n=A[i],o=Lr(n,r,"6379"),g=s(i);t.push("--session-save=redis",`--session-save-redis-host=${g}`,`--session-save-redis-port=${o}`,"--cache-backend=redis",`--cache-backend-redis-server=${g}`,`--cache-backend-redis-port=${o}`)}return t};var lb=A=>{let e=process.env.GITHUB_WORKSPACE||"",t=Ln.resolve(e,A),r=Ln.relative(e,t);if(r.startsWith(".."))throw new Error(`container_id: path ${A} resolves outside GITHUB_WORKSPACE (${e})`);return r?`/var/www/html/${r}`:"/var/www/html"};async function iu(){try{let A=Ye.getInput("services"),e=Ye.getInput("path")||".",t=Ye.getInput("extra_args").trim(),r=Ye.getInput("container_id").trim(),s=r!=="",i=null;A&&A!=="null"&&(i=JSON.parse(A)),i?.mysql&&await Ds("mysql",ru(i.mysql));let n=su(i,s);if(t&&n.push(...t.split(/\s+/)),s){let o=lb(e),g=`docker exec -w ${o} ${r} php bin/magento setup:install ${n.join(" ")}`;Ye.setOutput("command",g),await Ds("docker",["exec","-w",o,r,"php","bin/magento","setup:install",...n]),await Ds("docker",["exec",r,"sh","-c",`for d in var generated pub/static pub/media; do [ -d "${o}/$d" ] && chown -R www-data:www-data "${o}/$d"; done`])}else Ye.setOutput("command",`php bin/magento setup:install ${n.join(" ")}`),await Ds("php",["bin/magento","setup:install",...n],{cwd:e})}catch(A){Ye.setFailed(A.message)}}iu();0&&(module.exports={run}); /*! Bundled license information: undici/lib/fetch/body.js: diff --git a/setup-install/src/build-command.spec.ts b/setup-install/src/build-command.spec.ts index e67e6ee..96fb988 100644 --- a/setup-install/src/build-command.spec.ts +++ b/setup-install/src/build-command.spec.ts @@ -8,6 +8,7 @@ const BASE_ARGS = [ '--admin-firstname=Admin', '--admin-lastname=User', '--backend-frontname=admin', + '--no-interaction', ]; const MYSQL_SERVICE = { @@ -60,6 +61,10 @@ describe('buildInstallArgs', () => { it('returns only base args when services is empty', () => { expect(buildInstallArgs({})).toEqual(BASE_ARGS); }); + + it('runs non-interactively', () => { + expect(buildInstallArgs(null)).toContain('--no-interaction'); + }); }); describe('mysql', () => { diff --git a/setup-install/src/build-command.ts b/setup-install/src/build-command.ts index 8fe7e2f..2d59d60 100644 --- a/setup-install/src/build-command.ts +++ b/setup-install/src/build-command.ts @@ -24,6 +24,7 @@ const BASE_ARGS = [ '--admin-firstname=Admin', '--admin-lastname=User', '--backend-frontname=admin', + '--no-interaction', ]; const parsePort = (svc: ServiceConfig | undefined, index: 0 | 1, fallback: string): string => {