diff --git a/README.md b/README.md index b334cb6..56f0419 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@ After building your image, use [push-to-registry](https://github.com/redhat-acti | Input Name | Description | Default | | ---------- | ----------- | ------- | | arch | Label the image with this architecture, instead of defaulting to the host architecture. Refer to [Multi arch builds](#multi-arch-builds) for more information. | None (host architecture) -| platform | Label the image with this platform, instead of defaulting to the host platform. Refer to [Multi arch builds](#multi-arch-builds) for more information. | None (host platform) | base-image | The base image to use for the container. | **Required** | content | Paths to files or directories to copy inside the container to create the file image. This is a multiline input to allow you to copy multiple files/directories.| None | entrypoint | The entry point to set for the container. Separate arguments by newline. | None diff --git a/action.yml b/action.yml index f226013..4ff4dea 100644 --- a/action.yml +++ b/action.yml @@ -57,7 +57,9 @@ inputs: description: 'Alias for "arch". "arch" takes precedence if both are set.' required: false platform: - description: 'Label the image with this PLATFORM, instead of defaulting to the host platform.' + description: | + Label the image with this PLATFORM, instead of defaulting to the host platform. + Only supported for containerfile builds. required: false extra-args: description: | diff --git a/dist/index.js b/dist/index.js index 899f483..aaaa606 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -require('./sourcemap-register.js');module.exports=(()=>{var t={351:function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const s=i(n(87));const r=n(278);function issueCommand(t,e,n){const i=new Command(t,e,n);process.stdout.write(i.toString()+s.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const o="::";class Command{constructor(t,e,n){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=n}toString(){let t=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const i=this.properties[n];if(i){if(e){e=false}else{t+=","}t+=`${n}=${escapeProperty(i)}`}}}}t+=`${o}${escapeData(this.message)}`;return t}}function escapeData(t){return r.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return r.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=n(351);const o=n(717);const u=n(278);const c=s(n(87));const a=s(n(622));var l;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(l=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const n=u.toCommandValue(e);process.env[t]=n;const i=process.env["GITHUB_ENV"]||"";if(i){const e="_GitHubActionsFileCommandDelimeter_";const i=`${t}<<${e}${c.EOL}${n}${c.EOL}${e}`;o.issueCommand("ENV",i)}else{r.issueCommand("set-env",{name:t},n)}}e.exportVariable=exportVariable;function setSecret(t){r.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){o.issueCommand("PATH",t)}else{r.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${a.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const n=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!n){throw new Error(`Input required and not supplied: ${t}`)}return n.trim()}e.getInput=getInput;function setOutput(t,e){r.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){r.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=l.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){r.issueCommand("debug",{},t)}e.debug=debug;function error(t){r.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){r.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){r.issue("group",t)}e.startGroup=startGroup;function endGroup(){r.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return i(this,void 0,void 0,function*(){startGroup(t);let n;try{n=yield e()}finally{endGroup()}return n})}e.group=group;function saveState(t,e){r.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},717:function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const s=i(n(747));const r=i(n(87));const o=n(278);function issueCommand(t,e){const n=process.env[`GITHUB_${t}`];if(!n){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!s.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}s.appendFileSync(n,`${o.toCommandValue(e)}${r.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue},514:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=s(n(159));function exec(t,e,n){return i(this,void 0,void 0,function*(){const i=r.argStringToArray(t);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const s=i[0];e=i.slice(1).concat(e||[]);const o=new r.ToolRunner(s,e,n);return o.exec()})}e.exec=exec},159:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=s(n(87));const o=s(n(614));const u=s(n(129));const c=s(n(622));const a=s(n(436));const l=s(n(962));const f=process.platform==="win32";class ToolRunner extends o.EventEmitter{constructor(t,e,n){super();if(!t){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=t;this.args=e||[];this.options=n||{}}_debug(t){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(t)}}_getCommandString(t,e){const n=this._getSpawnFileName();const i=this._getSpawnArgs(t);let s=e?"":"[command]";if(f){if(this._isCmdFile()){s+=n;for(const t of i){s+=` ${t}`}}else if(t.windowsVerbatimArguments){s+=`"${n}"`;for(const t of i){s+=` ${t}`}}else{s+=this._windowsQuoteCmdArg(n);for(const t of i){s+=` ${this._windowsQuoteCmdArg(t)}`}}}else{s+=n;for(const t of i){s+=` ${t}`}}return s}_processLineBuffer(t,e,n){try{let i=e+t.toString();let s=i.indexOf(r.EOL);while(s>-1){const t=i.substring(0,s);n(t);i=i.substring(s+r.EOL.length);s=i.indexOf(r.EOL)}e=i}catch(t){this._debug(`error processing line. Failed with error ${t}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(t){if(f){if(this._isCmdFile()){let e=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const n of this.args){e+=" ";e+=t.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n)}e+='"';return[e]}}return this.args}_endsWith(t,e){return t.endsWith(e)}_isCmdFile(){const t=this.toolPath.toUpperCase();return this._endsWith(t,".CMD")||this._endsWith(t,".BAT")}_windowsQuoteCmdArg(t){if(!this._isCmdFile()){return this._uvQuoteCmdArg(t)}if(!t){return'""'}const e=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let n=false;for(const i of t){if(e.some(t=>t===i)){n=true;break}}if(!n){return t}let i='"';let s=true;for(let e=t.length;e>0;e--){i+=t[e-1];if(s&&t[e-1]==="\\"){i+="\\"}else if(t[e-1]==='"'){s=true;i+='"'}else{s=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(t){if(!t){return'""'}if(!t.includes(" ")&&!t.includes("\t")&&!t.includes('"')){return t}if(!t.includes('"')&&!t.includes("\\")){return`"${t}"`}let e='"';let n=true;for(let i=t.length;i>0;i--){e+=t[i-1];if(n&&t[i-1]==="\\"){e+="\\"}else if(t[i-1]==='"'){n=true;e+="\\"}else{n=false}}e+='"';return e.split("").reverse().join("")}_cloneExecOptions(t){t=t||{};const e={cwd:t.cwd||process.cwd(),env:t.env||process.env,silent:t.silent||false,windowsVerbatimArguments:t.windowsVerbatimArguments||false,failOnStdErr:t.failOnStdErr||false,ignoreReturnCode:t.ignoreReturnCode||false,delay:t.delay||1e4};e.outStream=t.outStream||process.stdout;e.errStream=t.errStream||process.stderr;return e}_getSpawnOptions(t,e){t=t||{};const n={};n.cwd=t.cwd;n.env=t.env;n["windowsVerbatimArguments"]=t.windowsVerbatimArguments||this._isCmdFile();if(t.windowsVerbatimArguments){n.argv0=`"${e}"`}return n}exec(){return i(this,void 0,void 0,function*(){if(!l.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=c.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield a.which(this.toolPath,true);return new Promise((t,e)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const t of this.args){this._debug(` ${t}`)}const n=this._cloneExecOptions(this.options);if(!n.silent&&n.outStream){n.outStream.write(this._getCommandString(n)+r.EOL)}const i=new ExecState(n,this.toolPath);i.on("debug",t=>{this._debug(t)});const s=this._getSpawnFileName();const o=u.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s));const c="";if(o.stdout){o.stdout.on("data",t=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(t)}if(!n.silent&&n.outStream){n.outStream.write(t)}this._processLineBuffer(t,c,t=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(t)}})})}const a="";if(o.stderr){o.stderr.on("data",t=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(t)}if(!n.silent&&n.errStream&&n.outStream){const e=n.failOnStdErr?n.errStream:n.outStream;e.write(t)}this._processLineBuffer(t,a,t=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(t)}})})}o.on("error",t=>{i.processError=t.message;i.processExited=true;i.processClosed=true;i.CheckComplete()});o.on("exit",t=>{i.processExitCode=t;i.processExited=true;this._debug(`Exit code ${t} received from tool '${this.toolPath}'`);i.CheckComplete()});o.on("close",t=>{i.processExitCode=t;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()});i.on("done",(n,i)=>{if(c.length>0){this.emit("stdline",c)}if(a.length>0){this.emit("errline",a)}o.removeAllListeners();if(n){e(n)}else{t(i)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}e.ToolRunner=ToolRunner;function argStringToArray(t){const e=[];let n=false;let i=false;let s="";function append(t){if(i&&t!=='"'){s+="\\"}s+=t;i=false}for(let r=0;r0){e.push(s);s=""}continue}append(o)}if(s.length>0){e.push(s.trim())}return e}e.argStringToArray=argStringToArray;class ExecState extends o.EventEmitter{constructor(t,e){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!e){throw new Error("toolPath must not be empty")}this.options=t;this.toolPath=e;if(t.delay){this.delay=t.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(t){this.emit("debug",t)}_setResult(){let t;if(this.processExited){if(this.processError){t=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}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){t=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){t=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",t,this.processExitCode)}static HandleTimeout(t){if(t.done){return}if(!t.processClosed&&t.processExited){const e=`The STDIO streams did not close within ${t.delay/1e3} seconds of the exit event from process '${t.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;t._debug(e)}t._setResult()}}},962:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s;Object.defineProperty(e,"__esModule",{value:true});const r=n(357);const o=n(747);const u=n(622);s=o.promises,e.chmod=s.chmod,e.copyFile=s.copyFile,e.lstat=s.lstat,e.mkdir=s.mkdir,e.readdir=s.readdir,e.readlink=s.readlink,e.rename=s.rename,e.rmdir=s.rmdir,e.stat=s.stat,e.symlink=s.symlink,e.unlink=s.unlink;e.IS_WINDOWS=process.platform==="win32";function exists(t){return i(this,void 0,void 0,function*(){try{yield e.stat(t)}catch(t){if(t.code==="ENOENT"){return false}throw t}return true})}e.exists=exists;function isDirectory(t,n=false){return i(this,void 0,void 0,function*(){const i=n?yield e.stat(t):yield e.lstat(t);return i.isDirectory()})}e.isDirectory=isDirectory;function isRooted(t){t=normalizeSeparators(t);if(!t){throw new Error('isRooted() parameter "p" cannot be empty')}if(e.IS_WINDOWS){return t.startsWith("\\")||/^[A-Z]:/i.test(t)}return t.startsWith("/")}e.isRooted=isRooted;function mkdirP(t,n=1e3,s=1){return i(this,void 0,void 0,function*(){r.ok(t,"a path argument must be provided");t=u.resolve(t);if(s>=n)return e.mkdir(t);try{yield e.mkdir(t);return}catch(i){switch(i.code){case"ENOENT":{yield mkdirP(u.dirname(t),n,s+1);yield e.mkdir(t);return}default:{let n;try{n=yield e.stat(t)}catch(t){throw i}if(!n.isDirectory())throw i}}}})}e.mkdirP=mkdirP;function tryGetExecutablePath(t,n){return i(this,void 0,void 0,function*(){let i=undefined;try{i=yield e.stat(t)}catch(e){if(e.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}}if(i&&i.isFile()){if(e.IS_WINDOWS){const e=u.extname(t).toUpperCase();if(n.some(t=>t.toUpperCase()===e)){return t}}else{if(isUnixExecutable(i)){return t}}}const s=t;for(const r of n){t=s+r;i=undefined;try{i=yield e.stat(t)}catch(e){if(e.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}}if(i&&i.isFile()){if(e.IS_WINDOWS){try{const n=u.dirname(t);const i=u.basename(t).toUpperCase();for(const s of yield e.readdir(n)){if(i===s.toUpperCase()){t=u.join(n,s);break}}}catch(e){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${e}`)}return t}else{if(isUnixExecutable(i)){return t}}}}return""})}e.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(t){t=t||"";if(e.IS_WINDOWS){t=t.replace(/\//g,"\\");return t.replace(/\\\\+/g,"\\")}return t.replace(/\/\/+/g,"/")}function isUnixExecutable(t){return(t.mode&1)>0||(t.mode&8)>0&&t.gid===process.getgid()||(t.mode&64)>0&&t.uid===process.getuid()}},436:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:true});const s=n(129);const r=n(622);const o=n(669);const u=n(962);const c=o.promisify(s.exec);function cp(t,e,n={}){return i(this,void 0,void 0,function*(){const{force:i,recursive:s}=readCopyOptions(n);const o=(yield u.exists(e))?yield u.stat(e):null;if(o&&o.isFile()&&!i){return}const c=o&&o.isDirectory()?r.join(e,r.basename(t)):e;if(!(yield u.exists(t))){throw new Error(`no such file or directory: ${t}`)}const a=yield u.stat(t);if(a.isDirectory()){if(!s){throw new Error(`Failed to copy. ${t} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(t,c,0,i)}}else{if(r.relative(t,c)===""){throw new Error(`'${c}' and '${t}' are the same file`)}yield copyFile(t,c,i)}})}e.cp=cp;function mv(t,e,n={}){return i(this,void 0,void 0,function*(){if(yield u.exists(e)){let i=true;if(yield u.isDirectory(e)){e=r.join(e,r.basename(t));i=yield u.exists(e)}if(i){if(n.force==null||n.force){yield rmRF(e)}else{throw new Error("Destination already exists")}}}yield mkdirP(r.dirname(e));yield u.rename(t,e)})}e.mv=mv;function rmRF(t){return i(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(t,true)){yield c(`rd /s /q "${t}"`)}else{yield c(`del /f /a "${t}"`)}}catch(t){if(t.code!=="ENOENT")throw t}try{yield u.unlink(t)}catch(t){if(t.code!=="ENOENT")throw t}}else{let e=false;try{e=yield u.isDirectory(t)}catch(t){if(t.code!=="ENOENT")throw t;return}if(e){yield c(`rm -rf "${t}"`)}else{yield u.unlink(t)}}})}e.rmRF=rmRF;function mkdirP(t){return i(this,void 0,void 0,function*(){yield u.mkdirP(t)})}e.mkdirP=mkdirP;function which(t,e){return i(this,void 0,void 0,function*(){if(!t){throw new Error("parameter 'tool' is required")}if(e){const e=yield which(t,false);if(!e){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${t}. 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.`)}else{throw new Error(`Unable to locate executable file: ${t}. 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.`)}}}try{const e=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const t of process.env.PATHEXT.split(r.delimiter)){if(t){e.push(t)}}}if(u.isRooted(t)){const n=yield u.tryGetExecutablePath(t,e);if(n){return n}return""}if(t.includes("/")||u.IS_WINDOWS&&t.includes("\\")){return""}const n=[];if(process.env.PATH){for(const t of process.env.PATH.split(r.delimiter)){if(t){n.push(t)}}}for(const i of n){const n=yield u.tryGetExecutablePath(i+r.sep+t,e);if(n){return n}}return""}catch(t){throw new Error(`which failed with message ${t.message}`)}})}e.which=which;function readCopyOptions(t){const e=t.force==null?true:t.force;const n=Boolean(t.recursive);return{force:e,recursive:n}}function cpDirRecursive(t,e,n,s){return i(this,void 0,void 0,function*(){if(n>=255)return;n++;yield mkdirP(e);const i=yield u.readdir(t);for(const r of i){const i=`${t}/${r}`;const o=`${e}/${r}`;const c=yield u.lstat(i);if(c.isDirectory()){yield cpDirRecursive(i,o,n,s)}else{yield copyFile(i,o,s)}}yield u.chmod(e,(yield u.stat(t)).mode)})}function copyFile(t,e,n){return i(this,void 0,void 0,function*(){if((yield u.lstat(t)).isSymbolicLink()){try{yield u.lstat(e);yield u.unlink(e)}catch(t){if(t.code==="EPERM"){yield u.chmod(e,"0666");yield u.unlink(e)}}const n=yield u.readlink(t);yield u.symlink(n,e,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(e))||n){yield u.copyFile(t,e)}})}},885:t=>{const{hasOwnProperty:e}=Object.prototype;const n=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";const i=(t,e)=>{const r=[];let o="";if(typeof e==="string"){e={section:e,whitespace:false}}else{e=e||Object.create(null);e.whitespace=e.whitespace===true}const c=e.whitespace?" = ":"=";for(const e of Object.keys(t)){const i=t[e];if(i&&Array.isArray(i)){for(const t of i)o+=u(e+"[]")+c+u(t)+"\n"}else if(i&&typeof i==="object")r.push(e);else o+=u(e)+c+u(i)+n}if(e.section&&o.length)o="["+u(e.section)+"]"+n+o;for(const u of r){const r=s(u).join("\\.");const c=(e.section?e.section+".":"")+r;const{whitespace:a}=e;const l=i(t[u],{section:c,whitespace:a});if(o.length&&l.length)o+=n;o+=l}return o};const s=t=>t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,""));const r=t=>{const n=Object.create(null);let i=n;let r=null;const o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;const u=t.split(/[\r\n]+/g);for(const t of u){if(!t||t.match(/^\s*[;#]/))continue;const s=t.match(o);if(!s)continue;if(s[1]!==undefined){r=c(s[1]);if(r==="__proto__"){i=Object.create(null);continue}i=n[r]=n[r]||Object.create(null);continue}const u=c(s[2]);const a=u.length>2&&u.slice(-2)==="[]";const l=a?u.slice(0,-2):u;if(l==="__proto__")continue;const f=s[3]?c(s[4]):true;const d=f==="true"||f==="false"||f==="null"?JSON.parse(f):f;if(a){if(!e.call(i,l))i[l]=[];else if(!Array.isArray(i[l]))i[l]=[i[l]]}if(Array.isArray(i[l]))i[l].push(d);else i[l]=d}const a=[];for(const t of Object.keys(n)){if(!e.call(n,t)||typeof n[t]!=="object"||Array.isArray(n[t]))continue;const i=s(t);let r=n;const o=i.pop();const u=o.replace(/\\\./g,".");for(const t of i){if(t==="__proto__")continue;if(!e.call(r,t)||typeof r[t]!=="object")r[t]=Object.create(null);r=r[t]}if(r===n&&u===o)continue;r[u]=n[t];a.push(t)}for(const t of a)delete n[t];return n};const o=t=>t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'";const u=t=>typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&o(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#");const c=(t,e)=>{t=(t||"").trim();if(o(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{let e=false;let n="";for(let i=0,s=t.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BuildahCli=void 0;const i=n(186);const s=n(514);const r=n(622);const o=n(314);class BuildahCli{constructor(t){this.storageOptsEnv="";this.executable=t}async setStorageOptsEnv(){if(await o.isStorageDriverOverlay()){const t=await o.findFuseOverlayfsPath();if(t){i.info(`Overriding storage mount_program with "fuse-overlayfs" in environment`);this.storageOptsEnv=`overlay.mount_program=${t}`}else{i.warning(`"fuse-overlayfs" is not found. Install it before running this action. `+`For more detail see https://github.com/redhat-actions/buildah-build/issues/45`)}}else{i.info("Storage driver is not 'overlay', so not overriding storage configuration")}}static getImageFormatOption(t){return["--format",t?"oci":"docker"]}async buildUsingDocker(t,e,n,i,s,r,o,u,c){const a=["bud"];if(r){a.push("--arch");a.push(r)}if(o){a.push("--platform");a.push(o)}n.forEach(t=>{a.push("-f");a.push(t)});i.forEach(t=>{a.push("--build-arg");a.push(t)});a.push(...BuildahCli.getImageFormatOption(s));if(u){a.push(`--layers=${u}`)}if(c.length>0){a.push(...c)}a.push("-t");a.push(t);a.push(e);return this.execute(a)}async from(t){return this.execute(["from",t])}async copy(t,e,n){if(e.length===0){return undefined}i.debug("copy");i.debug(t);for(const i of e){const e=["copy",t,i];if(n){e.push(n)}return this.execute(e)}return undefined}async config(t,e){i.debug("config");i.debug(t);const n=["config"];if(e.entrypoint){n.push("--entrypoint");n.push(BuildahCli.convertArrayToStringArg(e.entrypoint))}if(e.port){n.push("--port");n.push(e.port)}if(e.envs){e.envs.forEach(t=>{n.push("--env");n.push(t)})}if(e.arch){n.push("--arch");n.push(e.arch)}if(e.platform){n.push("--platform");n.push(e.platform)}if(e.workingdir){n.push("--workingdir");n.push(e.workingdir)}n.push(t);return this.execute(n)}async commit(t,e,n){i.debug("commit");i.debug(t);i.debug(e);const s=["commit",...BuildahCli.getImageFormatOption(n),"--squash",t,e];return this.execute(s)}async tag(t,e){const n=["tag"];for(const i of e){n.push(o.getFullImageName(t,i))}i.info(`Tagging the built image with tags ${e.toString()}`);return this.execute(n)}static convertArrayToStringArg(t){let e="[";t.forEach(t=>{e+=`"${t}",`});return`${e.slice(0,-1)}]`}async execute(t,e={}){let n="";let o="";const u={...e};u.ignoreReturnCode=true;u.listeners={stdline:t=>{n+=t+"\n"},errline:t=>{o+=t+"\n"}};if(e.group){const e=[this.executable,...t].join(" ");i.startGroup(e)}const c={};Object.entries(process.env).forEach(([t,e])=>{if(e!=null){c[t]=e}});if(this.storageOptsEnv){c.STORAGE_OPTS=this.storageOptsEnv}u.env=c;try{const c=await s.exec(this.executable,t,u);if(e.ignoreReturnCode!==true&&c!==0){let t=`${r.basename(this.executable)} exited with code ${c}`;if(o){t+=`\n${o}`}throw new Error(t)}return{exitCode:c,output:n,error:o}}finally{if(e.group){i.endGroup()}}}}e.BuildahCli=BuildahCli},69:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Outputs=e.Inputs=void 0;var n;(function(t){t["ARCH"]="arch";t["ARCHS"]="archs";t["BASE_IMAGE"]="base-image";t["BUILD_ARGS"]="build-args";t["CONTAINERFILES"]="containerfiles";t["CONTENT"]="content";t["CONTEXT"]="context";t["DOCKERFILES"]="dockerfiles";t["ENTRYPOINT"]="entrypoint";t["ENVS"]="envs";t["EXTRA_ARGS"]="extra-args";t["IMAGE"]="image";t["LAYERS"]="layers";t["OCI"]="oci";t["PLATFORM"]="platform";t["PORT"]="port";t["TAGS"]="tags";t["WORKDIR"]="workdir"})(n=e.Inputs||(e.Inputs={}));var i;(function(t){t["IMAGE"]="image";t["IMAGE_WITH_TAG"]="image-with-tag";t["TAGS"]="tags"})(i=e.Outputs||(e.Outputs={}))},144:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.run=void 0;const i=n(186);const s=n(436);const r=n(622);const o=n(69);const u=n(987);const c=n(314);async function run(){if(process.env.RUNNER_OS!=="Linux"){throw new Error("buildah, and therefore this action, only works on Linux. Please use a Linux runner.")}const t=await s.which("buildah",true);const e=new u.BuildahCli(t);await e.execute(["version"],{group:true});await e.setStorageOptsEnv();const n="latest";const r=process.env.GITHUB_WORKSPACE||process.cwd();const a=c.getContainerfiles();const l=i.getInput(o.Inputs.IMAGE);const f=i.getInput(o.Inputs.TAGS);const d=f.trim().split(/\s+/);if(d.length===0){i.info(`Input "${o.Inputs.TAGS}" is not provided, using default tag "${n}"`);d.push(n)}const p=c.isFullImageName(d[0]);if(d.some(t=>c.isFullImageName(t)!==p)){throw new Error(`Input "${o.Inputs.TAGS}" cannot have a mix of full name and non full name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`)}if(!p&&!l){throw new Error(`Input "${o.Inputs.IMAGE}" must be provided when not using full image name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`)}const h=c.getFullImageName(l,d[0]);const g=i.getInput(o.Inputs.OCI)==="true";const m=c.getArch();const y=c.getPlatform();if(m&&y){throw new Error("The --platform option may not be used in combination with the --arch option.")}if(a.length!==0){await doBuildUsingContainerFiles(e,h,r,a,g,m,y)}else{await doBuildFromScratch(e,h,g,m,y)}if(d.length>1){await e.tag(l,d)}i.setOutput(o.Outputs.IMAGE,l);i.setOutput(o.Outputs.TAGS,f);i.setOutput(o.Outputs.IMAGE_WITH_TAG,h)}e.run=run;async function doBuildUsingContainerFiles(t,e,n,s,u,a,l){if(s.length===1){i.info(`Performing build from Containerfile`)}else{i.info(`Performing build from ${s.length} Containerfiles`)}const f=r.join(n,i.getInput(o.Inputs.CONTEXT));const d=c.getInputList(o.Inputs.BUILD_ARGS);const p=s.map(t=>r.join(n,t));const h=i.getInput(o.Inputs.LAYERS);const g=i.getInput(o.Inputs.EXTRA_ARGS);let m=[];if(g){const t=c.splitByNewline(g);m=t.flatMap(t=>t.split(" ")).map(t=>t.trim())}await t.buildUsingDocker(e,f,p,d,u,a,l,h,m)}async function doBuildFromScratch(t,e,n,s,r){i.info(`Performing build from scratch`);const u=i.getInput(o.Inputs.BASE_IMAGE,{required:true});const a=c.getInputList(o.Inputs.CONTENT);const l=c.getInputList(o.Inputs.ENTRYPOINT);const f=i.getInput(o.Inputs.PORT);const d=i.getInput(o.Inputs.WORKDIR);const p=c.getInputList(o.Inputs.ENVS);const h=await t.from(u);const g=h.output.replace("\n","");const m={entrypoint:l,port:f,workingdir:d,envs:p,arch:s,platform:r};await t.config(g,m);await t.copy(g,a);await t.commit(g,e,n)}run().catch(i.setFailed)},314:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getFullImageName=e.isFullImageName=e.getInputList=e.getContainerfiles=e.getPlatform=e.getArch=e.splitByNewline=e.findFuseOverlayfsPath=e.isStorageDriverOverlay=void 0;const i=n(885);const s=n(747);const r=n(186);const o=n(622);const u=n(436);const c=n(87);const a=n(69);async function findStorageDriver(t){let e="";for(const n of t){r.debug(`Checking if the storage file exists at ${n}`);if(await fileExists(n)){r.debug(`Storage file exists at ${n}`);const t=i.parse(await s.promises.readFile(n,"utf-8"));if(t.storage.driver){e=t.storage.driver}}}return e}async function isStorageDriverOverlay(){let t=o.join(c.homedir(),".config");if(process.env.XDG_CONFIG_HOME){t=process.env.XDG_CONFIG_HOME}const e=["/etc/containers/storage.conf",o.join(t,"containers/storage.conf")];const n=await findStorageDriver(e);return n==="overlay"}e.isStorageDriverOverlay=isStorageDriverOverlay;async function fileExists(t){try{await s.promises.access(t);return true}catch(t){return false}}async function findFuseOverlayfsPath(){let t;try{t=await u.which("fuse-overlayfs")}catch(t){r.debug(t)}return t}e.findFuseOverlayfsPath=findFuseOverlayfsPath;function splitByNewline(t){return t.split(/\r?\n/)}e.splitByNewline=splitByNewline;function getArch(){const t=r.getInput(a.Inputs.ARCHS);const e=r.getInput(a.Inputs.ARCH);if(e&&t){r.warning(`Both "${a.Inputs.ARCH}" and "${a.Inputs.ARCHS}" inputs are set. `+`Please use only one of these two inputs, as they are aliases of one another. `+`"${a.Inputs.ARCH}" takes precedence.`)}return e||t}e.getArch=getArch;function getPlatform(){return r.getInput(a.Inputs.PLATFORM)}e.getPlatform=getPlatform;function getContainerfiles(){const t=getInputList(a.Inputs.CONTAINERFILES);const e=getInputList(a.Inputs.DOCKERFILES);if(t.length!==0&&e.length!==0){r.warning(`Both "${a.Inputs.CONTAINERFILES}" and "${a.Inputs.DOCKERFILES}" inputs are set. `+`Please use only one of these two inputs, as they are aliases of one another. `+`"${a.Inputs.CONTAINERFILES}" takes precedence.`)}return t.length!==0?t:e}e.getContainerfiles=getContainerfiles;function getInputList(t){const e=r.getInput(t);if(!e){return[]}const n=splitByNewline(e);return n.reduce((t,e)=>t.concat(e).map(t=>t.trim()),[])}e.getInputList=getInputList;function isFullImageName(t){return t.indexOf(":")>0}e.isFullImageName=isFullImageName;function getFullImageName(t,e){if(isFullImageName(e)){return e}return`${t}:${e}`}e.getFullImageName=getFullImageName},357:t=>{"use strict";t.exports=require("assert")},129:t=>{"use strict";t.exports=require("child_process")},614:t=>{"use strict";t.exports=require("events")},747:t=>{"use strict";t.exports=require("fs")},87:t=>{"use strict";t.exports=require("os")},622:t=>{"use strict";t.exports=require("path")},669:t=>{"use strict";t.exports=require("util")}};var e={};function __webpack_require__(n){if(e[n]){return e[n].exports}var i=e[n]={exports:{}};var s=true;try{t[n].call(i.exports,i,i.exports,__webpack_require__);s=false}finally{if(s)delete e[n]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(144)})(); +require('./sourcemap-register.js');module.exports=(()=>{var t={351:function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const s=i(n(87));const r=n(278);function issueCommand(t,e,n){const i=new Command(t,e,n);process.stdout.write(i.toString()+s.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const o="::";class Command{constructor(t,e,n){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=n}toString(){let t=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const i=this.properties[n];if(i){if(e){e=false}else{t+=","}t+=`${n}=${escapeProperty(i)}`}}}}t+=`${o}${escapeData(this.message)}`;return t}}function escapeData(t){return r.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return r.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=n(351);const o=n(717);const u=n(278);const c=s(n(87));const a=s(n(622));var l;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(l=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const n=u.toCommandValue(e);process.env[t]=n;const i=process.env["GITHUB_ENV"]||"";if(i){const e="_GitHubActionsFileCommandDelimeter_";const i=`${t}<<${e}${c.EOL}${n}${c.EOL}${e}`;o.issueCommand("ENV",i)}else{r.issueCommand("set-env",{name:t},n)}}e.exportVariable=exportVariable;function setSecret(t){r.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){o.issueCommand("PATH",t)}else{r.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${a.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const n=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!n){throw new Error(`Input required and not supplied: ${t}`)}return n.trim()}e.getInput=getInput;function setOutput(t,e){r.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){r.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=l.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){r.issueCommand("debug",{},t)}e.debug=debug;function error(t){r.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){r.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){r.issue("group",t)}e.startGroup=startGroup;function endGroup(){r.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return i(this,void 0,void 0,function*(){startGroup(t);let n;try{n=yield e()}finally{endGroup()}return n})}e.group=group;function saveState(t,e){r.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},717:function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const s=i(n(747));const r=i(n(87));const o=n(278);function issueCommand(t,e){const n=process.env[`GITHUB_${t}`];if(!n){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!s.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}s.appendFileSync(n,`${o.toCommandValue(e)}${r.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue},514:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=s(n(159));function exec(t,e,n){return i(this,void 0,void 0,function*(){const i=r.argStringToArray(t);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const s=i[0];e=i.slice(1).concat(e||[]);const o=new r.ToolRunner(s,e,n);return o.exec()})}e.exec=exec},159:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=s(n(87));const o=s(n(614));const u=s(n(129));const c=s(n(622));const a=s(n(436));const l=s(n(962));const f=process.platform==="win32";class ToolRunner extends o.EventEmitter{constructor(t,e,n){super();if(!t){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=t;this.args=e||[];this.options=n||{}}_debug(t){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(t)}}_getCommandString(t,e){const n=this._getSpawnFileName();const i=this._getSpawnArgs(t);let s=e?"":"[command]";if(f){if(this._isCmdFile()){s+=n;for(const t of i){s+=` ${t}`}}else if(t.windowsVerbatimArguments){s+=`"${n}"`;for(const t of i){s+=` ${t}`}}else{s+=this._windowsQuoteCmdArg(n);for(const t of i){s+=` ${this._windowsQuoteCmdArg(t)}`}}}else{s+=n;for(const t of i){s+=` ${t}`}}return s}_processLineBuffer(t,e,n){try{let i=e+t.toString();let s=i.indexOf(r.EOL);while(s>-1){const t=i.substring(0,s);n(t);i=i.substring(s+r.EOL.length);s=i.indexOf(r.EOL)}e=i}catch(t){this._debug(`error processing line. Failed with error ${t}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(t){if(f){if(this._isCmdFile()){let e=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const n of this.args){e+=" ";e+=t.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n)}e+='"';return[e]}}return this.args}_endsWith(t,e){return t.endsWith(e)}_isCmdFile(){const t=this.toolPath.toUpperCase();return this._endsWith(t,".CMD")||this._endsWith(t,".BAT")}_windowsQuoteCmdArg(t){if(!this._isCmdFile()){return this._uvQuoteCmdArg(t)}if(!t){return'""'}const e=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let n=false;for(const i of t){if(e.some(t=>t===i)){n=true;break}}if(!n){return t}let i='"';let s=true;for(let e=t.length;e>0;e--){i+=t[e-1];if(s&&t[e-1]==="\\"){i+="\\"}else if(t[e-1]==='"'){s=true;i+='"'}else{s=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(t){if(!t){return'""'}if(!t.includes(" ")&&!t.includes("\t")&&!t.includes('"')){return t}if(!t.includes('"')&&!t.includes("\\")){return`"${t}"`}let e='"';let n=true;for(let i=t.length;i>0;i--){e+=t[i-1];if(n&&t[i-1]==="\\"){e+="\\"}else if(t[i-1]==='"'){n=true;e+="\\"}else{n=false}}e+='"';return e.split("").reverse().join("")}_cloneExecOptions(t){t=t||{};const e={cwd:t.cwd||process.cwd(),env:t.env||process.env,silent:t.silent||false,windowsVerbatimArguments:t.windowsVerbatimArguments||false,failOnStdErr:t.failOnStdErr||false,ignoreReturnCode:t.ignoreReturnCode||false,delay:t.delay||1e4};e.outStream=t.outStream||process.stdout;e.errStream=t.errStream||process.stderr;return e}_getSpawnOptions(t,e){t=t||{};const n={};n.cwd=t.cwd;n.env=t.env;n["windowsVerbatimArguments"]=t.windowsVerbatimArguments||this._isCmdFile();if(t.windowsVerbatimArguments){n.argv0=`"${e}"`}return n}exec(){return i(this,void 0,void 0,function*(){if(!l.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=c.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield a.which(this.toolPath,true);return new Promise((t,e)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const t of this.args){this._debug(` ${t}`)}const n=this._cloneExecOptions(this.options);if(!n.silent&&n.outStream){n.outStream.write(this._getCommandString(n)+r.EOL)}const i=new ExecState(n,this.toolPath);i.on("debug",t=>{this._debug(t)});const s=this._getSpawnFileName();const o=u.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s));const c="";if(o.stdout){o.stdout.on("data",t=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(t)}if(!n.silent&&n.outStream){n.outStream.write(t)}this._processLineBuffer(t,c,t=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(t)}})})}const a="";if(o.stderr){o.stderr.on("data",t=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(t)}if(!n.silent&&n.errStream&&n.outStream){const e=n.failOnStdErr?n.errStream:n.outStream;e.write(t)}this._processLineBuffer(t,a,t=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(t)}})})}o.on("error",t=>{i.processError=t.message;i.processExited=true;i.processClosed=true;i.CheckComplete()});o.on("exit",t=>{i.processExitCode=t;i.processExited=true;this._debug(`Exit code ${t} received from tool '${this.toolPath}'`);i.CheckComplete()});o.on("close",t=>{i.processExitCode=t;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()});i.on("done",(n,i)=>{if(c.length>0){this.emit("stdline",c)}if(a.length>0){this.emit("errline",a)}o.removeAllListeners();if(n){e(n)}else{t(i)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}e.ToolRunner=ToolRunner;function argStringToArray(t){const e=[];let n=false;let i=false;let s="";function append(t){if(i&&t!=='"'){s+="\\"}s+=t;i=false}for(let r=0;r0){e.push(s);s=""}continue}append(o)}if(s.length>0){e.push(s.trim())}return e}e.argStringToArray=argStringToArray;class ExecState extends o.EventEmitter{constructor(t,e){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!e){throw new Error("toolPath must not be empty")}this.options=t;this.toolPath=e;if(t.delay){this.delay=t.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(t){this.emit("debug",t)}_setResult(){let t;if(this.processExited){if(this.processError){t=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}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){t=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){t=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",t,this.processExitCode)}static HandleTimeout(t){if(t.done){return}if(!t.processClosed&&t.processExited){const e=`The STDIO streams did not close within ${t.delay/1e3} seconds of the exit event from process '${t.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;t._debug(e)}t._setResult()}}},962:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var s;Object.defineProperty(e,"__esModule",{value:true});const r=n(357);const o=n(747);const u=n(622);s=o.promises,e.chmod=s.chmod,e.copyFile=s.copyFile,e.lstat=s.lstat,e.mkdir=s.mkdir,e.readdir=s.readdir,e.readlink=s.readlink,e.rename=s.rename,e.rmdir=s.rmdir,e.stat=s.stat,e.symlink=s.symlink,e.unlink=s.unlink;e.IS_WINDOWS=process.platform==="win32";function exists(t){return i(this,void 0,void 0,function*(){try{yield e.stat(t)}catch(t){if(t.code==="ENOENT"){return false}throw t}return true})}e.exists=exists;function isDirectory(t,n=false){return i(this,void 0,void 0,function*(){const i=n?yield e.stat(t):yield e.lstat(t);return i.isDirectory()})}e.isDirectory=isDirectory;function isRooted(t){t=normalizeSeparators(t);if(!t){throw new Error('isRooted() parameter "p" cannot be empty')}if(e.IS_WINDOWS){return t.startsWith("\\")||/^[A-Z]:/i.test(t)}return t.startsWith("/")}e.isRooted=isRooted;function mkdirP(t,n=1e3,s=1){return i(this,void 0,void 0,function*(){r.ok(t,"a path argument must be provided");t=u.resolve(t);if(s>=n)return e.mkdir(t);try{yield e.mkdir(t);return}catch(i){switch(i.code){case"ENOENT":{yield mkdirP(u.dirname(t),n,s+1);yield e.mkdir(t);return}default:{let n;try{n=yield e.stat(t)}catch(t){throw i}if(!n.isDirectory())throw i}}}})}e.mkdirP=mkdirP;function tryGetExecutablePath(t,n){return i(this,void 0,void 0,function*(){let i=undefined;try{i=yield e.stat(t)}catch(e){if(e.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}}if(i&&i.isFile()){if(e.IS_WINDOWS){const e=u.extname(t).toUpperCase();if(n.some(t=>t.toUpperCase()===e)){return t}}else{if(isUnixExecutable(i)){return t}}}const s=t;for(const r of n){t=s+r;i=undefined;try{i=yield e.stat(t)}catch(e){if(e.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${e}`)}}if(i&&i.isFile()){if(e.IS_WINDOWS){try{const n=u.dirname(t);const i=u.basename(t).toUpperCase();for(const s of yield e.readdir(n)){if(i===s.toUpperCase()){t=u.join(n,s);break}}}catch(e){console.log(`Unexpected error attempting to determine the actual case of the file '${t}': ${e}`)}return t}else{if(isUnixExecutable(i)){return t}}}}return""})}e.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(t){t=t||"";if(e.IS_WINDOWS){t=t.replace(/\//g,"\\");return t.replace(/\\\\+/g,"\\")}return t.replace(/\/\/+/g,"/")}function isUnixExecutable(t){return(t.mode&1)>0||(t.mode&8)>0&&t.gid===process.getgid()||(t.mode&64)>0&&t.uid===process.getuid()}},436:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,s){function fulfilled(t){try{step(i.next(t))}catch(t){s(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){s(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};Object.defineProperty(e,"__esModule",{value:true});const s=n(129);const r=n(622);const o=n(669);const u=n(962);const c=o.promisify(s.exec);function cp(t,e,n={}){return i(this,void 0,void 0,function*(){const{force:i,recursive:s}=readCopyOptions(n);const o=(yield u.exists(e))?yield u.stat(e):null;if(o&&o.isFile()&&!i){return}const c=o&&o.isDirectory()?r.join(e,r.basename(t)):e;if(!(yield u.exists(t))){throw new Error(`no such file or directory: ${t}`)}const a=yield u.stat(t);if(a.isDirectory()){if(!s){throw new Error(`Failed to copy. ${t} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(t,c,0,i)}}else{if(r.relative(t,c)===""){throw new Error(`'${c}' and '${t}' are the same file`)}yield copyFile(t,c,i)}})}e.cp=cp;function mv(t,e,n={}){return i(this,void 0,void 0,function*(){if(yield u.exists(e)){let i=true;if(yield u.isDirectory(e)){e=r.join(e,r.basename(t));i=yield u.exists(e)}if(i){if(n.force==null||n.force){yield rmRF(e)}else{throw new Error("Destination already exists")}}}yield mkdirP(r.dirname(e));yield u.rename(t,e)})}e.mv=mv;function rmRF(t){return i(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(t,true)){yield c(`rd /s /q "${t}"`)}else{yield c(`del /f /a "${t}"`)}}catch(t){if(t.code!=="ENOENT")throw t}try{yield u.unlink(t)}catch(t){if(t.code!=="ENOENT")throw t}}else{let e=false;try{e=yield u.isDirectory(t)}catch(t){if(t.code!=="ENOENT")throw t;return}if(e){yield c(`rm -rf "${t}"`)}else{yield u.unlink(t)}}})}e.rmRF=rmRF;function mkdirP(t){return i(this,void 0,void 0,function*(){yield u.mkdirP(t)})}e.mkdirP=mkdirP;function which(t,e){return i(this,void 0,void 0,function*(){if(!t){throw new Error("parameter 'tool' is required")}if(e){const e=yield which(t,false);if(!e){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${t}. 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.`)}else{throw new Error(`Unable to locate executable file: ${t}. 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.`)}}}try{const e=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const t of process.env.PATHEXT.split(r.delimiter)){if(t){e.push(t)}}}if(u.isRooted(t)){const n=yield u.tryGetExecutablePath(t,e);if(n){return n}return""}if(t.includes("/")||u.IS_WINDOWS&&t.includes("\\")){return""}const n=[];if(process.env.PATH){for(const t of process.env.PATH.split(r.delimiter)){if(t){n.push(t)}}}for(const i of n){const n=yield u.tryGetExecutablePath(i+r.sep+t,e);if(n){return n}}return""}catch(t){throw new Error(`which failed with message ${t.message}`)}})}e.which=which;function readCopyOptions(t){const e=t.force==null?true:t.force;const n=Boolean(t.recursive);return{force:e,recursive:n}}function cpDirRecursive(t,e,n,s){return i(this,void 0,void 0,function*(){if(n>=255)return;n++;yield mkdirP(e);const i=yield u.readdir(t);for(const r of i){const i=`${t}/${r}`;const o=`${e}/${r}`;const c=yield u.lstat(i);if(c.isDirectory()){yield cpDirRecursive(i,o,n,s)}else{yield copyFile(i,o,s)}}yield u.chmod(e,(yield u.stat(t)).mode)})}function copyFile(t,e,n){return i(this,void 0,void 0,function*(){if((yield u.lstat(t)).isSymbolicLink()){try{yield u.lstat(e);yield u.unlink(e)}catch(t){if(t.code==="EPERM"){yield u.chmod(e,"0666");yield u.unlink(e)}}const n=yield u.readlink(t);yield u.symlink(n,e,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(e))||n){yield u.copyFile(t,e)}})}},885:t=>{const{hasOwnProperty:e}=Object.prototype;const n=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";const i=(t,e)=>{const r=[];let o="";if(typeof e==="string"){e={section:e,whitespace:false}}else{e=e||Object.create(null);e.whitespace=e.whitespace===true}const c=e.whitespace?" = ":"=";for(const e of Object.keys(t)){const i=t[e];if(i&&Array.isArray(i)){for(const t of i)o+=u(e+"[]")+c+u(t)+"\n"}else if(i&&typeof i==="object")r.push(e);else o+=u(e)+c+u(i)+n}if(e.section&&o.length)o="["+u(e.section)+"]"+n+o;for(const u of r){const r=s(u).join("\\.");const c=(e.section?e.section+".":"")+r;const{whitespace:a}=e;const l=i(t[u],{section:c,whitespace:a});if(o.length&&l.length)o+=n;o+=l}return o};const s=t=>t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,""));const r=t=>{const n=Object.create(null);let i=n;let r=null;const o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;const u=t.split(/[\r\n]+/g);for(const t of u){if(!t||t.match(/^\s*[;#]/))continue;const s=t.match(o);if(!s)continue;if(s[1]!==undefined){r=c(s[1]);if(r==="__proto__"){i=Object.create(null);continue}i=n[r]=n[r]||Object.create(null);continue}const u=c(s[2]);const a=u.length>2&&u.slice(-2)==="[]";const l=a?u.slice(0,-2):u;if(l==="__proto__")continue;const f=s[3]?c(s[4]):true;const d=f==="true"||f==="false"||f==="null"?JSON.parse(f):f;if(a){if(!e.call(i,l))i[l]=[];else if(!Array.isArray(i[l]))i[l]=[i[l]]}if(Array.isArray(i[l]))i[l].push(d);else i[l]=d}const a=[];for(const t of Object.keys(n)){if(!e.call(n,t)||typeof n[t]!=="object"||Array.isArray(n[t]))continue;const i=s(t);let r=n;const o=i.pop();const u=o.replace(/\\\./g,".");for(const t of i){if(t==="__proto__")continue;if(!e.call(r,t)||typeof r[t]!=="object")r[t]=Object.create(null);r=r[t]}if(r===n&&u===o)continue;r[u]=n[t];a.push(t)}for(const t of a)delete n[t];return n};const o=t=>t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'";const u=t=>typeof t!=="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&o(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#");const c=(t,e)=>{t=(t||"").trim();if(o(t)){if(t.charAt(0)==="'")t=t.substr(1,t.length-2);try{t=JSON.parse(t)}catch(t){}}else{let e=false;let n="";for(let i=0,s=t.length;i{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BuildahCli=void 0;const i=n(186);const s=n(514);const r=n(622);const o=n(314);class BuildahCli{constructor(t){this.storageOptsEnv="";this.executable=t}async setStorageOptsEnv(){if(await o.isStorageDriverOverlay()){const t=await o.findFuseOverlayfsPath();if(t){i.info(`Overriding storage mount_program with "fuse-overlayfs" in environment`);this.storageOptsEnv=`overlay.mount_program=${t}`}else{i.warning(`"fuse-overlayfs" is not found. Install it before running this action. `+`For more detail see https://github.com/redhat-actions/buildah-build/issues/45`)}}else{i.info("Storage driver is not 'overlay', so not overriding storage configuration")}}static getImageFormatOption(t){return["--format",t?"oci":"docker"]}async buildUsingDocker(t,e,n,i,s,r,o,u,c){const a=["bud"];if(r){a.push("--arch");a.push(r)}if(o){a.push("--platform");a.push(o)}n.forEach(t=>{a.push("-f");a.push(t)});i.forEach(t=>{a.push("--build-arg");a.push(t)});a.push(...BuildahCli.getImageFormatOption(s));if(u){a.push(`--layers=${u}`)}if(c.length>0){a.push(...c)}a.push("-t");a.push(t);a.push(e);return this.execute(a)}async from(t){return this.execute(["from",t])}async copy(t,e,n){if(e.length===0){return undefined}i.debug("copy");i.debug(t);for(const i of e){const e=["copy",t,i];if(n){e.push(n)}return this.execute(e)}return undefined}async config(t,e){i.debug("config");i.debug(t);const n=["config"];if(e.entrypoint){n.push("--entrypoint");n.push(BuildahCli.convertArrayToStringArg(e.entrypoint))}if(e.port){n.push("--port");n.push(e.port)}if(e.envs){e.envs.forEach(t=>{n.push("--env");n.push(t)})}if(e.arch){n.push("--arch");n.push(e.arch)}if(e.workingdir){n.push("--workingdir");n.push(e.workingdir)}n.push(t);return this.execute(n)}async commit(t,e,n){i.debug("commit");i.debug(t);i.debug(e);const s=["commit",...BuildahCli.getImageFormatOption(n),"--squash",t,e];return this.execute(s)}async tag(t,e){const n=["tag"];for(const i of e){n.push(o.getFullImageName(t,i))}i.info(`Tagging the built image with tags ${e.toString()}`);return this.execute(n)}static convertArrayToStringArg(t){let e="[";t.forEach(t=>{e+=`"${t}",`});return`${e.slice(0,-1)}]`}async execute(t,e={}){let n="";let o="";const u={...e};u.ignoreReturnCode=true;u.listeners={stdline:t=>{n+=t+"\n"},errline:t=>{o+=t+"\n"}};if(e.group){const e=[this.executable,...t].join(" ");i.startGroup(e)}const c={};Object.entries(process.env).forEach(([t,e])=>{if(e!=null){c[t]=e}});if(this.storageOptsEnv){c.STORAGE_OPTS=this.storageOptsEnv}u.env=c;try{const c=await s.exec(this.executable,t,u);if(e.ignoreReturnCode!==true&&c!==0){let t=`${r.basename(this.executable)} exited with code ${c}`;if(o){t+=`\n${o}`}throw new Error(t)}return{exitCode:c,output:n,error:o}}finally{if(e.group){i.endGroup()}}}}e.BuildahCli=BuildahCli},69:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Outputs=e.Inputs=void 0;var n;(function(t){t["ARCH"]="arch";t["ARCHS"]="archs";t["BASE_IMAGE"]="base-image";t["BUILD_ARGS"]="build-args";t["CONTAINERFILES"]="containerfiles";t["CONTENT"]="content";t["CONTEXT"]="context";t["DOCKERFILES"]="dockerfiles";t["ENTRYPOINT"]="entrypoint";t["ENVS"]="envs";t["EXTRA_ARGS"]="extra-args";t["IMAGE"]="image";t["LAYERS"]="layers";t["OCI"]="oci";t["PLATFORM"]="platform";t["PORT"]="port";t["TAGS"]="tags";t["WORKDIR"]="workdir"})(n=e.Inputs||(e.Inputs={}));var i;(function(t){t["IMAGE"]="image";t["IMAGE_WITH_TAG"]="image-with-tag";t["TAGS"]="tags"})(i=e.Outputs||(e.Outputs={}))},144:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.run=void 0;const i=n(186);const s=n(436);const r=n(622);const o=n(69);const u=n(987);const c=n(314);async function run(){if(process.env.RUNNER_OS!=="Linux"){throw new Error("buildah, and therefore this action, only works on Linux. Please use a Linux runner.")}const t=await s.which("buildah",true);const e=new u.BuildahCli(t);await e.execute(["version"],{group:true});await e.setStorageOptsEnv();const n="latest";const r=process.env.GITHUB_WORKSPACE||process.cwd();const a=c.getContainerfiles();const l=i.getInput(o.Inputs.IMAGE);const f=i.getInput(o.Inputs.TAGS);const d=f.trim().split(/\s+/);if(d.length===0){i.info(`Input "${o.Inputs.TAGS}" is not provided, using default tag "${n}"`);d.push(n)}const p=c.isFullImageName(d[0]);if(d.some(t=>c.isFullImageName(t)!==p)){throw new Error(`Input "${o.Inputs.TAGS}" cannot have a mix of full name and non full name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`)}if(!p&&!l){throw new Error(`Input "${o.Inputs.IMAGE}" must be provided when not using full image name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`)}const h=c.getFullImageName(l,d[0]);const g=i.getInput(o.Inputs.OCI)==="true";const m=c.getArch();const y=c.getPlatform();if(m&&y){throw new Error("The --platform option may not be used in combination with the --arch option.")}if(a.length!==0){await doBuildUsingContainerFiles(e,h,r,a,g,m,y)}else{if(y){throw new Error("The --platform option is not supported for builds without containerfiles.")}await doBuildFromScratch(e,h,g,m)}if(d.length>1){await e.tag(l,d)}i.setOutput(o.Outputs.IMAGE,l);i.setOutput(o.Outputs.TAGS,f);i.setOutput(o.Outputs.IMAGE_WITH_TAG,h)}e.run=run;async function doBuildUsingContainerFiles(t,e,n,s,u,a,l){if(s.length===1){i.info(`Performing build from Containerfile`)}else{i.info(`Performing build from ${s.length} Containerfiles`)}const f=r.join(n,i.getInput(o.Inputs.CONTEXT));const d=c.getInputList(o.Inputs.BUILD_ARGS);const p=s.map(t=>r.join(n,t));const h=i.getInput(o.Inputs.LAYERS);const g=i.getInput(o.Inputs.EXTRA_ARGS);let m=[];if(g){const t=c.splitByNewline(g);m=t.flatMap(t=>t.split(" ")).map(t=>t.trim())}await t.buildUsingDocker(e,f,p,d,u,a,l,h,m)}async function doBuildFromScratch(t,e,n,s){i.info(`Performing build from scratch`);const r=i.getInput(o.Inputs.BASE_IMAGE,{required:true});const u=c.getInputList(o.Inputs.CONTENT);const a=c.getInputList(o.Inputs.ENTRYPOINT);const l=i.getInput(o.Inputs.PORT);const f=i.getInput(o.Inputs.WORKDIR);const d=c.getInputList(o.Inputs.ENVS);const p=await t.from(r);const h=p.output.replace("\n","");const g={entrypoint:a,port:l,workingdir:f,envs:d,arch:s};await t.config(h,g);await t.copy(h,u);await t.commit(h,e,n)}run().catch(i.setFailed)},314:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.getFullImageName=e.isFullImageName=e.getInputList=e.getContainerfiles=e.getPlatform=e.getArch=e.splitByNewline=e.findFuseOverlayfsPath=e.isStorageDriverOverlay=void 0;const i=n(885);const s=n(747);const r=n(186);const o=n(622);const u=n(436);const c=n(87);const a=n(69);async function findStorageDriver(t){let e="";for(const n of t){r.debug(`Checking if the storage file exists at ${n}`);if(await fileExists(n)){r.debug(`Storage file exists at ${n}`);const t=i.parse(await s.promises.readFile(n,"utf-8"));if(t.storage.driver){e=t.storage.driver}}}return e}async function isStorageDriverOverlay(){let t=o.join(c.homedir(),".config");if(process.env.XDG_CONFIG_HOME){t=process.env.XDG_CONFIG_HOME}const e=["/etc/containers/storage.conf",o.join(t,"containers/storage.conf")];const n=await findStorageDriver(e);return n==="overlay"}e.isStorageDriverOverlay=isStorageDriverOverlay;async function fileExists(t){try{await s.promises.access(t);return true}catch(t){return false}}async function findFuseOverlayfsPath(){let t;try{t=await u.which("fuse-overlayfs")}catch(t){r.debug(t)}return t}e.findFuseOverlayfsPath=findFuseOverlayfsPath;function splitByNewline(t){return t.split(/\r?\n/)}e.splitByNewline=splitByNewline;function getArch(){const t=r.getInput(a.Inputs.ARCHS);const e=r.getInput(a.Inputs.ARCH);if(e&&t){r.warning(`Both "${a.Inputs.ARCH}" and "${a.Inputs.ARCHS}" inputs are set. `+`Please use only one of these two inputs, as they are aliases of one another. `+`"${a.Inputs.ARCH}" takes precedence.`)}return e||t}e.getArch=getArch;function getPlatform(){return r.getInput(a.Inputs.PLATFORM)}e.getPlatform=getPlatform;function getContainerfiles(){const t=getInputList(a.Inputs.CONTAINERFILES);const e=getInputList(a.Inputs.DOCKERFILES);if(t.length!==0&&e.length!==0){r.warning(`Both "${a.Inputs.CONTAINERFILES}" and "${a.Inputs.DOCKERFILES}" inputs are set. `+`Please use only one of these two inputs, as they are aliases of one another. `+`"${a.Inputs.CONTAINERFILES}" takes precedence.`)}return t.length!==0?t:e}e.getContainerfiles=getContainerfiles;function getInputList(t){const e=r.getInput(t);if(!e){return[]}const n=splitByNewline(e);return n.reduce((t,e)=>t.concat(e).map(t=>t.trim()),[])}e.getInputList=getInputList;function isFullImageName(t){return t.indexOf(":")>0}e.isFullImageName=isFullImageName;function getFullImageName(t,e){if(isFullImageName(e)){return e}return`${t}:${e}`}e.getFullImageName=getFullImageName},357:t=>{"use strict";t.exports=require("assert")},129:t=>{"use strict";t.exports=require("child_process")},614:t=>{"use strict";t.exports=require("events")},747:t=>{"use strict";t.exports=require("fs")},87:t=>{"use strict";t.exports=require("os")},622:t=>{"use strict";t.exports=require("path")},669:t=>{"use strict";t.exports=require("util")}};var e={};function __webpack_require__(n){if(e[n]){return e[n].exports}var i=e[n]={exports:{}};var s=true;try{t[n].call(i.exports,i,i.exports,__webpack_require__);s=false}finally{if(s)delete e[n]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(144)})(); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 5f14810..c0da3b9 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack:/buildah-build/node_modules/@actions/core/lib/command.js","../webpack:/buildah-build/node_modules/@actions/core/lib/core.js","../webpack:/buildah-build/node_modules/@actions/core/lib/file-command.js","../webpack:/buildah-build/node_modules/@actions/core/lib/utils.js","../webpack:/buildah-build/node_modules/@actions/exec/lib/exec.js","../webpack:/buildah-build/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/buildah-build/node_modules/@actions/io/lib/io-util.js","../webpack:/buildah-build/node_modules/@actions/io/lib/io.js","../webpack:/buildah-build/node_modules/ini/ini.js","../webpack:/buildah-build/src/buildah.ts","../webpack:/buildah-build/src/generated/inputs-outputs.ts","../webpack:/buildah-build/src/index.ts","../webpack:/buildah-build/src/utils.ts","../webpack:/buildah-build/external \"assert\"","../webpack:/buildah-build/external \"child_process\"","../webpack:/buildah-build/external \"events\"","../webpack:/buildah-build/external \"fs\"","../webpack:/buildah-build/external \"os\"","../webpack:/buildah-build/external \"path\"","../webpack:/buildah-build/external \"util\"","../webpack:/buildah-build/webpack/bootstrap","../webpack:/buildah-build/webpack/runtime/compat","../webpack:/buildah-build/webpack/startup"],"names":["__importStar","this","mod","__esModule","result","k","Object","hasOwnProperty","call","defineProperty","exports","value","os","__webpack_require__","utils_1","issueCommand","command","properties","message","cmd","Command","process","stdout","write","toString","EOL","issue","name","CMD_STRING","[object Object]","cmdStr","keys","length","first","key","val","escapeProperty","escapeData","s","toCommandValue","replace","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","command_1","file_command_1","path","ExitCode","exportVariable","convertedVal","env","filePath","delimiter","commandValue","setSecret","secret","addPath","inputPath","getInput","options","toUpperCase","required","Error","trim","setOutput","setCommandEcho","enabled","setFailed","exitCode","Failure","error","isDebug","debug","warning","info","startGroup","endGroup","group","fn","saveState","getState","fs","existsSync","appendFileSync","encoding","input","undefined","String","JSON","stringify","tr","exec","commandLine","args","commandArgs","argStringToArray","toolPath","slice","concat","runner","ToolRunner","events","child","io","ioUtil","IS_WINDOWS","platform","EventEmitter","super","listeners","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","a","windowsVerbatimArguments","_windowsQuoteCmdArg","data","strBuffer","onLine","n","indexOf","line","substring","err","_debug","argline","str","end","endsWith","upperToolPath","_endsWith","arg","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","char","some","x","reverse","quoteHit","i","split","join","includes","cwd","silent","failOnStdErr","ignoreReturnCode","delay","outStream","errStream","stderr","argv0","isRooted","which","optionsNonNull","_cloneExecOptions","_getCommandString","state","ExecState","on","fileName","cp","spawn","_getSpawnOptions","stdbuffer","_processLineBuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","code","processExitCode","emit","removeAllListeners","stdin","argString","inQuotes","escaped","append","c","charAt","push","timeout","_setResult","setTimeout","HandleTimeout","clearTimeout","_a","assert_1","promises","chmod","copyFile","lstat","mkdir","readdir","readlink","rename","rmdir","stat","symlink","unlink","exists","fsPath","isDirectory","useStat","stats","p","normalizeSeparators","startsWith","test","mkdirP","maxDepth","depth","ok","dirname","err2","tryGetExecutablePath","extensions","console","log","isFile","upperExt","extname","validExt","isUnixExecutable","originalFilePath","extension","directory","upperName","basename","actualName","mode","gid","getgid","uid","getuid","childProcess","util_1","promisify","source","dest","force","recursive","readCopyOptions","destStat","newDest","sourceStat","cpDirRecursive","relative","mv","destExists","rmRF","isDir","tool","check","PATHEXT","directories","PATH","sep","Boolean","sourceDir","destDir","currentDepth","files","srcFile","destFile","srcFileStat","isSymbolicLink","symlinkFull","prototype","eol","encode","obj","opt","children","out","section","whitespace","create","separator","Array","isArray","item","safe","nk","dotSplit","map","part","decode","re","lines","match","unsafe","keyRaw","valueRaw","parse","remove","parts","l","pop","nl","del","isQuoted","doUnesc","substr","_","esc","unesc","module","core","BuildahCli","executable","storageOptsEnv","isStorageDriverOverlay","fuseOverlayfsPath","findFuseOverlayfsPath","useOCI","image","context","containerFiles","buildArgs","arch","layers","extraArgs","forEach","file","buildArg","getImageFormatOption","execute","baseImage","container","contentToCopy","contentPath","content","settings","entrypoint","convertArrayToStringArg","port","envs","workingdir","newImageName","imageName","tags","tag","getFullImageName","arrayAsString","execOptions","finalExecOptions","groupName","execEnv","entries","STORAGE_OPTS","output","Inputs","Outputs","inputs_outputs_1","buildah_1","async","run","RUNNER_OS","buildahPath","cli","setStorageOptsEnv","DEFAULT_TAG","workspace","GITHUB_WORKSPACE","getContainerfiles","IMAGE","TAGS","tagsList","isFullImageNameTag","isFullImageName","newImage","OCI","getArch","getPlatform","doBuildUsingContainerFiles","doBuildFromScratch","IMAGE_WITH_TAG","CONTEXT","getInputList","BUILD_ARGS","containerFileAbsPaths","LAYERS","inputExtraArgsStr","EXTRA_ARGS","buildahBudExtraArgs","splitByNewline","flatMap","buildUsingDocker","BASE_IMAGE","CONTENT","ENTRYPOINT","PORT","workingDir","WORKDIR","ENVS","from","containerId","newImageConfig","config","copy","commit","catch","ini","fs_1","findStorageDriver","filePaths","storageDriver","fileExists","fileContent","readFile","storage","driver","xdgConfigHome","homedir","XDG_CONFIG_HOME","access","archs","ARCHS","ARCH","PLATFORM","containerfiles","CONTAINERFILES","dockerfiles","DOCKERFILES","items","splitItems","reduce","acc","require","__webpack_module_cache__","moduleId","threw","__webpack_modules__","ab","__dirname"],"mappings":"6DACA,IAAAA,EAAAC,M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IA,IAAA2b,EAAA,KACA,IACAC,EAAAF,GAAA5b,KAAAgU,EAAA9T,QAAA8T,EAAAA,EAAA9T,QAAAG,qBACAwb,EAAA,MACA,QACA,GAAAA,SAAAF,EAAAC,GAIA,OAAA5H,EAAA9T,QCzBAG,oBAAA0b,GAAAC,UAAA,ICEA,OAAA3b,oBAAA","file":"index.js","sourcesContent":["\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n */\nfunction error(message) {\n command_1.issue('error', message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n */\nfunction warning(message) {\n command_1.issue('warning', message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n strBuffer = s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n const stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n const errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n });\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = 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}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = require(\"assert\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\nexports.IS_WINDOWS = process.platform === 'win32';\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Recursively create a directory at `fsPath`.\n *\n * This implementation is optimistic, meaning it attempts to create the full\n * path first, and backs up the path stack from there.\n *\n * @param fsPath The path to create\n * @param maxDepth The maximum recursion depth\n * @param depth The current recursion depth\n */\nfunction mkdirP(fsPath, maxDepth = 1000, depth = 1) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n fsPath = path.resolve(fsPath);\n if (depth >= maxDepth)\n return exports.mkdir(fsPath);\n try {\n yield exports.mkdir(fsPath);\n return;\n }\n catch (err) {\n switch (err.code) {\n case 'ENOENT': {\n yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);\n yield exports.mkdir(fsPath);\n return;\n }\n default: {\n let stats;\n try {\n stats = yield exports.stat(fsPath);\n }\n catch (err2) {\n throw err;\n }\n if (!stats.isDirectory())\n throw err;\n }\n }\n }\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst childProcess = require(\"child_process\");\nconst path = require(\"path\");\nconst util_1 = require(\"util\");\nconst ioUtil = require(\"./io-util\");\nconst exec = util_1.promisify(childProcess.exec);\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory()\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another\n // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.\n try {\n if (yield ioUtil.isDirectory(inputPath, true)) {\n yield exec(`rd /s /q \"${inputPath}\"`);\n }\n else {\n yield exec(`del /f /a \"${inputPath}\"`);\n }\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n // Shelling out fails to remove a symlink folder with missing source, this unlink catches that\n try {\n yield ioUtil.unlink(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n }\n else {\n let isDir = false;\n try {\n isDir = yield ioUtil.isDirectory(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n return;\n }\n if (isDir) {\n yield exec(`rm -rf \"${inputPath}\"`);\n }\n else {\n yield ioUtil.unlink(inputPath);\n }\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n yield ioUtil.mkdirP(fsPath);\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n }\n }\n try {\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env.PATHEXT) {\n for (const extension of process.env.PATHEXT.split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return filePath;\n }\n return '';\n }\n // if any path separators, return empty\n if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\\\'))) {\n return '';\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // return the first match\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions);\n if (filePath) {\n return filePath;\n }\n }\n return '';\n }\n catch (err) {\n throw new Error(`which failed with message ${err.message}`);\n }\n });\n}\nexports.which = which;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n return { force, recursive };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","const { hasOwnProperty } = Object.prototype\n\nconst eol = typeof process !== 'undefined' &&\n process.platform === 'win32' ? '\\r\\n' : '\\n'\n\nconst encode = (obj, opt) => {\n const children = []\n let out = ''\n\n if (typeof opt === 'string') {\n opt = {\n section: opt,\n whitespace: false,\n }\n } else {\n opt = opt || Object.create(null)\n opt.whitespace = opt.whitespace === true\n }\n\n const separator = opt.whitespace ? ' = ' : '='\n\n for (const k of Object.keys(obj)) {\n const val = obj[k]\n if (val && Array.isArray(val)) {\n for (const item of val)\n out += safe(k + '[]') + separator + safe(item) + '\\n'\n } else if (val && typeof val === 'object')\n children.push(k)\n else\n out += safe(k) + separator + safe(val) + eol\n }\n\n if (opt.section && out.length)\n out = '[' + safe(opt.section) + ']' + eol + out\n\n for (const k of children) {\n const nk = dotSplit(k).join('\\\\.')\n const section = (opt.section ? opt.section + '.' : '') + nk\n const { whitespace } = opt\n const child = encode(obj[k], {\n section,\n whitespace,\n })\n if (out.length && child.length)\n out += eol\n\n out += child\n }\n\n return out\n}\n\nconst dotSplit = str =>\n str.replace(/\\1/g, '\\u0002LITERAL\\\\1LITERAL\\u0002')\n .replace(/\\\\\\./g, '\\u0001')\n .split(/\\./)\n .map(part =>\n part.replace(/\\1/g, '\\\\.')\n .replace(/\\2LITERAL\\\\1LITERAL\\2/g, '\\u0001'))\n\nconst decode = str => {\n const out = Object.create(null)\n let p = out\n let section = null\n // section |key = value\n const re = /^\\[([^\\]]*)\\]$|^([^=]+)(=(.*))?$/i\n const lines = str.split(/[\\r\\n]+/g)\n\n for (const line of lines) {\n if (!line || line.match(/^\\s*[;#]/))\n continue\n const match = line.match(re)\n if (!match)\n continue\n if (match[1] !== undefined) {\n section = unsafe(match[1])\n if (section === '__proto__') {\n // not allowed\n // keep parsing the section, but don't attach it.\n p = Object.create(null)\n continue\n }\n p = out[section] = out[section] || Object.create(null)\n continue\n }\n const keyRaw = unsafe(match[2])\n const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]'\n const key = isArray ? keyRaw.slice(0, -2) : keyRaw\n if (key === '__proto__')\n continue\n const valueRaw = match[3] ? unsafe(match[4]) : true\n const value = valueRaw === 'true' ||\n valueRaw === 'false' ||\n valueRaw === 'null' ? JSON.parse(valueRaw)\n : valueRaw\n\n // Convert keys with '[]' suffix to an array\n if (isArray) {\n if (!hasOwnProperty.call(p, key))\n p[key] = []\n else if (!Array.isArray(p[key]))\n p[key] = [p[key]]\n }\n\n // safeguard against resetting a previously defined\n // array by accidentally forgetting the brackets\n if (Array.isArray(p[key]))\n p[key].push(value)\n else\n p[key] = value\n }\n\n // {a:{y:1},\"a.b\":{x:2}} --> {a:{y:1,b:{x:2}}}\n // use a filter to return the keys that have to be deleted.\n const remove = []\n for (const k of Object.keys(out)) {\n if (!hasOwnProperty.call(out, k) ||\n typeof out[k] !== 'object' ||\n Array.isArray(out[k]))\n continue\n\n // see if the parent section is also an object.\n // if so, add it to that, and mark this one for deletion\n const parts = dotSplit(k)\n let p = out\n const l = parts.pop()\n const nl = l.replace(/\\\\\\./g, '.')\n for (const part of parts) {\n if (part === '__proto__')\n continue\n if (!hasOwnProperty.call(p, part) || typeof p[part] !== 'object')\n p[part] = Object.create(null)\n p = p[part]\n }\n if (p === out && nl === l)\n continue\n\n p[nl] = out[k]\n remove.push(k)\n }\n for (const del of remove)\n delete out[del]\n\n return out\n}\n\nconst isQuoted = val =>\n (val.charAt(0) === '\"' && val.slice(-1) === '\"') ||\n (val.charAt(0) === \"'\" && val.slice(-1) === \"'\")\n\nconst safe = val =>\n (typeof val !== 'string' ||\n val.match(/[=\\r\\n]/) ||\n val.match(/^\\[/) ||\n (val.length > 1 &&\n isQuoted(val)) ||\n val !== val.trim())\n ? JSON.stringify(val)\n : val.replace(/;/g, '\\\\;').replace(/#/g, '\\\\#')\n\nconst unsafe = (val, doUnesc) => {\n val = (val || '').trim()\n if (isQuoted(val)) {\n // remove the single quotes before calling JSON.parse\n if (val.charAt(0) === \"'\")\n val = val.substr(1, val.length - 2)\n\n try {\n val = JSON.parse(val)\n } catch (_) {}\n } else {\n // walk the val to find the first not-escaped ; character\n let esc = false\n let unesc = ''\n for (let i = 0, l = val.length; i < l; i++) {\n const c = val.charAt(i)\n if (esc) {\n if ('\\\\;#'.indexOf(c) !== -1)\n unesc += c\n else\n unesc += '\\\\' + c\n\n esc = false\n } else if (';#'.indexOf(c) !== -1)\n break\n else if (c === '\\\\')\n esc = true\n else\n unesc += c\n }\n if (esc)\n unesc += '\\\\'\n\n return unesc.trim()\n }\n return val\n}\n\nmodule.exports = {\n parse: decode,\n decode,\n stringify: encode,\n encode,\n safe,\n unsafe,\n}\n","/***************************************************************************************************\n * Copyright (c) Red Hat, Inc. All rights reserved.\n * Licensed under the MIT License. See LICENSE file in the project root for license information.\n **************************************************************************************************/\n\nimport * as core from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport * as path from \"path\";\nimport CommandResult from \"./types\";\nimport { isStorageDriverOverlay, findFuseOverlayfsPath, getFullImageName } from \"./utils\";\n\nexport interface BuildahConfigSettings {\n entrypoint?: string[];\n envs?: string[];\n port?: string;\n workingdir?: string;\n arch?: string;\n platform?: string;\n}\n\ninterface Buildah {\n buildUsingDocker(\n image: string, context: string, containerFiles: string[], buildArgs: string[],\n useOCI: boolean, arch: string, platform: string, layers: string, extraArgs: string[]\n ): Promise;\n from(baseImage: string): Promise;\n config(container: string, setting: BuildahConfigSettings): Promise;\n copy(container: string, contentToCopy: string[]): Promise;\n commit(container: string, newImageName: string, useOCI: boolean): Promise;\n}\n\nexport class BuildahCli implements Buildah {\n private readonly executable: string;\n\n public storageOptsEnv = \"\";\n\n constructor(executable: string) {\n this.executable = executable;\n }\n\n // Checks for storage driver if found \"overlay\",\n // then checks if \"fuse-overlayfs\" is installed.\n // If yes, add mount program to use \"fuse-overlayfs\"\n async setStorageOptsEnv(): Promise {\n if (await isStorageDriverOverlay()) {\n const fuseOverlayfsPath = await findFuseOverlayfsPath();\n if (fuseOverlayfsPath) {\n core.info(`Overriding storage mount_program with \"fuse-overlayfs\" in environment`);\n this.storageOptsEnv = `overlay.mount_program=${fuseOverlayfsPath}`;\n }\n else {\n core.warning(`\"fuse-overlayfs\" is not found. Install it before running this action. `\n + `For more detail see https://github.com/redhat-actions/buildah-build/issues/45`);\n }\n }\n else {\n core.info(\"Storage driver is not 'overlay', so not overriding storage configuration\");\n }\n }\n\n private static getImageFormatOption(useOCI: boolean): string[] {\n return [ \"--format\", useOCI ? \"oci\" : \"docker\" ];\n }\n\n async buildUsingDocker(\n image: string, context: string, containerFiles: string[], buildArgs: string[],\n useOCI: boolean, arch: string, platform: string, layers: string, extraArgs: string[]\n ): Promise {\n const args: string[] = [ \"bud\" ];\n if (arch) {\n args.push(\"--arch\");\n args.push(arch);\n }\n if (platform) {\n args.push(\"--platform\");\n args.push(platform);\n }\n containerFiles.forEach((file) => {\n args.push(\"-f\");\n args.push(file);\n });\n buildArgs.forEach((buildArg) => {\n args.push(\"--build-arg\");\n args.push(buildArg);\n });\n args.push(...BuildahCli.getImageFormatOption(useOCI));\n if (layers) {\n args.push(`--layers=${layers}`);\n }\n if (extraArgs.length > 0) {\n args.push(...extraArgs);\n }\n args.push(\"-t\");\n args.push(image);\n args.push(context);\n return this.execute(args);\n }\n\n async from(baseImage: string): Promise {\n return this.execute([ \"from\", baseImage ]);\n }\n\n async copy(container: string, contentToCopy: string[], contentPath?: string): Promise {\n if (contentToCopy.length === 0) {\n return undefined;\n }\n\n core.debug(\"copy\");\n core.debug(container);\n for (const content of contentToCopy) {\n const args: string[] = [ \"copy\", container, content ];\n if (contentPath) {\n args.push(contentPath);\n }\n return this.execute(args);\n }\n\n return undefined;\n }\n\n async config(container: string, settings: BuildahConfigSettings): Promise {\n core.debug(\"config\");\n core.debug(container);\n const args: string[] = [ \"config\" ];\n if (settings.entrypoint) {\n args.push(\"--entrypoint\");\n args.push(BuildahCli.convertArrayToStringArg(settings.entrypoint));\n }\n if (settings.port) {\n args.push(\"--port\");\n args.push(settings.port);\n }\n if (settings.envs) {\n settings.envs.forEach((env) => {\n args.push(\"--env\");\n args.push(env);\n });\n }\n if (settings.arch) {\n args.push(\"--arch\");\n args.push(settings.arch);\n }\n if (settings.platform) {\n args.push(\"--platform\");\n args.push(settings.platform);\n }\n if (settings.workingdir) {\n args.push(\"--workingdir\");\n args.push(settings.workingdir);\n }\n args.push(container);\n return this.execute(args);\n }\n\n async commit(container: string, newImageName: string, useOCI: boolean): Promise {\n core.debug(\"commit\");\n core.debug(container);\n core.debug(newImageName);\n const args: string[] = [\n \"commit\", ...BuildahCli.getImageFormatOption(useOCI),\n \"--squash\", container, newImageName,\n ];\n return this.execute(args);\n }\n\n async tag(imageName: string, tags: string[]): Promise {\n const args: string[] = [ \"tag\" ];\n for (const tag of tags) {\n args.push(getFullImageName(imageName, tag));\n }\n core.info(`Tagging the built image with tags ${tags.toString()}`);\n return this.execute(args);\n }\n\n private static convertArrayToStringArg(args: string[]): string {\n let arrayAsString = \"[\";\n args.forEach((arg) => {\n arrayAsString += `\"${arg}\",`;\n });\n return `${arrayAsString.slice(0, -1)}]`;\n }\n\n async execute(\n args: string[],\n execOptions: exec.ExecOptions & { group?: boolean } = {},\n ): Promise {\n // ghCore.info(`${EXECUTABLE} ${args.join(\" \")}`)\n\n let stdout = \"\";\n let stderr = \"\";\n\n const finalExecOptions = { ...execOptions };\n finalExecOptions.ignoreReturnCode = true; // the return code is processed below\n\n finalExecOptions.listeners = {\n stdline: (line): void => {\n stdout += line + \"\\n\";\n },\n errline: (line):void => {\n stderr += line + \"\\n\";\n },\n };\n\n if (execOptions.group) {\n const groupName = [ this.executable, ...args ].join(\" \");\n core.startGroup(groupName);\n }\n\n // To solve https://github.com/redhat-actions/buildah-build/issues/45\n const execEnv: { [key: string] : string } = {};\n Object.entries(process.env).forEach(([ key, value ]) => {\n if (value != null) {\n execEnv[key] = value;\n }\n });\n\n if (this.storageOptsEnv) {\n execEnv.STORAGE_OPTS = this.storageOptsEnv;\n }\n\n finalExecOptions.env = execEnv;\n\n try {\n const exitCode = await exec.exec(this.executable, args, finalExecOptions);\n\n if (execOptions.ignoreReturnCode !== true && exitCode !== 0) {\n // Throwing the stderr as part of the Error makes the stderr\n // show up in the action outline, which saves some clicking when debugging.\n let error = `${path.basename(this.executable)} exited with code ${exitCode}`;\n if (stderr) {\n error += `\\n${stderr}`;\n }\n throw new Error(error);\n }\n\n return {\n exitCode, output: stdout, error: stderr,\n };\n }\n\n finally {\n if (execOptions.group) {\n core.endGroup();\n }\n }\n }\n}\n","// This file was auto-generated by action-io-generator. Do not edit by hand!\nexport enum Inputs {\n /**\n * Label the image with this ARCH, instead of defaulting to the host architecture.\n * Required: false\n * Default: None.\n */\n ARCH = \"arch\",\n /**\n * Alias for \"arch\". \"arch\" takes precedence if both are set.\n * Required: false\n * Default: None.\n */\n ARCHS = \"archs\",\n /**\n * The base image to use to create a new container image\n * Required: false\n * Default: None.\n */\n BASE_IMAGE = \"base-image\",\n /**\n * List of --build-args to pass to buildah\n * Required: false\n * Default: None.\n */\n BUILD_ARGS = \"build-args\",\n /**\n * List of Containerfile paths (eg: ./Containerfile)\n * Required: false\n * Default: None.\n */\n CONTAINERFILES = \"containerfiles\",\n /**\n * List of files/directories to copy inside the base image\n * Required: false\n * Default: None.\n */\n CONTENT = \"content\",\n /**\n * Path of the directory to use as context (default: .)\n * Required: false\n * Default: \".\"\n */\n CONTEXT = \"context\",\n /**\n * Alias for \"containerfiles\". \"containerfiles\" takes precedence if both are set.\n * Required: false\n * Default: None.\n */\n DOCKERFILES = \"dockerfiles\",\n /**\n * The entry point to set for containers based on image\n * Required: false\n * Default: None.\n */\n ENTRYPOINT = \"entrypoint\",\n /**\n * List of environment variables to be set when running containers based on image\n * Required: false\n * Default: None.\n */\n ENVS = \"envs\",\n /**\n * Extra args to be passed to buildah bud.\n * Separate arguments by newline. Do not use quotes - @actions/exec will do the quoting for you.\n * Required: false\n * Default: None.\n */\n EXTRA_ARGS = \"extra-args\",\n /**\n * The name (reference) of the image to build\n * Required: false\n * Default: None.\n */\n IMAGE = \"image\",\n /**\n * Set to true to cache intermediate layers during build process\n * Required: false\n * Default: None.\n */\n LAYERS = \"layers\",\n /**\n * Set to true to build using the OCI image format instead of the Docker image format\n * Required: false\n * Default: \"false\"\n */\n OCI = \"oci\",\n /**\n * Label the image with this PLATFORM, instead of defaulting to the host platform.\n * Required: false\n * Default: None.\n */\n PLATFORM = \"platform\",\n /**\n * The port to expose when running containers based on image\n * Required: false\n * Default: None.\n */\n PORT = \"port\",\n /**\n * The tags of the image to build. For multiple tags, seperate by whitespace. For example, \"latest v1\".\n * Required: false\n * Default: \"latest\"\n */\n TAGS = \"tags\",\n /**\n * The working directory to use within the container\n * Required: false\n * Default: None.\n */\n WORKDIR = \"workdir\",\n}\n\nexport enum Outputs {\n /**\n * Name of the image built\n * Required: false\n * Default: None.\n */\n IMAGE = \"image\",\n /**\n * Name of the image tagged with the first tag present\n * Required: false\n * Default: None.\n */\n IMAGE_WITH_TAG = \"image-with-tag\",\n /**\n * List of the tags that were created, separated by spaces\n * Required: false\n * Default: None.\n */\n TAGS = \"tags\",\n}\n","/***************************************************************************************************\n * Copyright (c) Red Hat, Inc. All rights reserved.\n * Licensed under the MIT License. See LICENSE file in the project root for license information.\n **************************************************************************************************/\n\nimport * as core from \"@actions/core\";\nimport * as io from \"@actions/io\";\nimport * as path from \"path\";\nimport { Inputs, Outputs } from \"./generated/inputs-outputs\";\nimport { BuildahCli, BuildahConfigSettings } from \"./buildah\";\nimport {\n getArch, getPlatform, getContainerfiles, getInputList, splitByNewline,\n isFullImageName, getFullImageName,\n} from \"./utils\";\n\nexport async function run(): Promise {\n if (process.env.RUNNER_OS !== \"Linux\") {\n throw new Error(\"buildah, and therefore this action, only works on Linux. Please use a Linux runner.\");\n }\n\n // get buildah cli\n const buildahPath = await io.which(\"buildah\", true);\n const cli: BuildahCli = new BuildahCli(buildahPath);\n\n // print buildah version\n await cli.execute([ \"version\" ], { group: true });\n\n // Check if fuse-overlayfs exists and find the storage driver\n await cli.setStorageOptsEnv();\n\n const DEFAULT_TAG = \"latest\";\n const workspace = process.env.GITHUB_WORKSPACE || process.cwd();\n const containerFiles = getContainerfiles();\n const image = core.getInput(Inputs.IMAGE);\n const tags = core.getInput(Inputs.TAGS);\n const tagsList: string[] = tags.trim().split(/\\s+/);\n\n // info message if user doesn't provides any tag\n if (tagsList.length === 0) {\n core.info(`Input \"${Inputs.TAGS}\" is not provided, using default tag \"${DEFAULT_TAG}\"`);\n tagsList.push(DEFAULT_TAG);\n }\n\n // check if all tags provided are in `image:tag` format\n const isFullImageNameTag = isFullImageName(tagsList[0]);\n if (tagsList.some((tag) => isFullImageName(tag) !== isFullImageNameTag)) {\n throw new Error(`Input \"${Inputs.TAGS}\" cannot have a mix of full name and non full name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`);\n }\n if (!isFullImageNameTag && !image) {\n throw new Error(`Input \"${Inputs.IMAGE}\" must be provided when not using full image name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`);\n }\n\n const newImage = getFullImageName(image, tagsList[0]);\n const useOCI = core.getInput(Inputs.OCI) === \"true\";\n\n const arch = getArch();\n const platform = getPlatform();\n\n if (arch && platform) {\n throw new Error(\"The --platform option may not be used in combination with the --arch option.\");\n }\n\n if (containerFiles.length !== 0) {\n await doBuildUsingContainerFiles(cli, newImage, workspace, containerFiles, useOCI, arch, platform);\n }\n else {\n await doBuildFromScratch(cli, newImage, useOCI, arch, platform);\n }\n\n if (tagsList.length > 1) {\n await cli.tag(image, tagsList);\n }\n core.setOutput(Outputs.IMAGE, image);\n core.setOutput(Outputs.TAGS, tags);\n core.setOutput(Outputs.IMAGE_WITH_TAG, newImage);\n}\n\nasync function doBuildUsingContainerFiles(\n cli: BuildahCli, newImage: string, workspace: string, containerFiles: string[], useOCI: boolean, arch: string,\n platform: string\n): Promise {\n if (containerFiles.length === 1) {\n core.info(`Performing build from Containerfile`);\n }\n else {\n core.info(`Performing build from ${containerFiles.length} Containerfiles`);\n }\n\n const context = path.join(workspace, core.getInput(Inputs.CONTEXT));\n const buildArgs = getInputList(Inputs.BUILD_ARGS);\n const containerFileAbsPaths = containerFiles.map((file) => path.join(workspace, file));\n const layers = core.getInput(Inputs.LAYERS);\n\n const inputExtraArgsStr = core.getInput(Inputs.EXTRA_ARGS);\n let buildahBudExtraArgs: string[] = [];\n if (inputExtraArgsStr) {\n // transform the array of lines into an array of arguments\n // by splitting over lines, then over spaces, then trimming.\n const lines = splitByNewline(inputExtraArgsStr);\n buildahBudExtraArgs = lines.flatMap((line) => line.split(\" \")).map((arg) => arg.trim());\n }\n await cli.buildUsingDocker(\n newImage, context, containerFileAbsPaths, buildArgs, useOCI, arch, platform, layers, buildahBudExtraArgs\n );\n}\n\nasync function doBuildFromScratch(\n cli: BuildahCli, newImage: string, useOCI: boolean, arch: string, platform: string\n): Promise {\n core.info(`Performing build from scratch`);\n\n const baseImage = core.getInput(Inputs.BASE_IMAGE, { required: true });\n const content = getInputList(Inputs.CONTENT);\n const entrypoint = getInputList(Inputs.ENTRYPOINT);\n const port = core.getInput(Inputs.PORT);\n const workingDir = core.getInput(Inputs.WORKDIR);\n const envs = getInputList(Inputs.ENVS);\n\n const container = await cli.from(baseImage);\n const containerId = container.output.replace(\"\\n\", \"\");\n\n const newImageConfig: BuildahConfigSettings = {\n entrypoint,\n port,\n workingdir: workingDir,\n envs,\n arch,\n platform,\n };\n await cli.config(containerId, newImageConfig);\n await cli.copy(containerId, content);\n await cli.commit(containerId, newImage, useOCI);\n}\n\nrun().catch(core.setFailed);\n","/***************************************************************************************************\n * Copyright (c) Red Hat, Inc. All rights reserved.\n * Licensed under the MIT License. See LICENSE file in the project root for license information.\n **************************************************************************************************/\n\nimport * as ini from \"ini\";\nimport { promises as fs } from \"fs\";\nimport * as core from \"@actions/core\";\nimport * as path from \"path\";\nimport * as io from \"@actions/io\";\nimport * as os from \"os\";\nimport { Inputs } from \"./generated/inputs-outputs\";\n\nasync function findStorageDriver(filePaths: string[]): Promise {\n let storageDriver = \"\";\n for (const filePath of filePaths) {\n core.debug(`Checking if the storage file exists at ${filePath}`);\n if (await fileExists(filePath)) {\n core.debug(`Storage file exists at ${filePath}`);\n const fileContent = ini.parse(await fs.readFile(filePath, \"utf-8\"));\n if (fileContent.storage.driver) {\n storageDriver = fileContent.storage.driver;\n }\n }\n }\n return storageDriver;\n}\n\nexport async function isStorageDriverOverlay(): Promise {\n let xdgConfigHome = path.join(os.homedir(), \".config\");\n if (process.env.XDG_CONFIG_HOME) {\n xdgConfigHome = process.env.XDG_CONFIG_HOME;\n }\n const filePaths: string[] = [\n \"/etc/containers/storage.conf\",\n path.join(xdgConfigHome, \"containers/storage.conf\"),\n ];\n const storageDriver = await findStorageDriver(filePaths);\n return (storageDriver === \"overlay\");\n}\n\nasync function fileExists(filePath: string): Promise {\n try {\n await fs.access(filePath);\n return true;\n }\n catch (err) {\n return false;\n }\n}\n\nexport async function findFuseOverlayfsPath(): Promise {\n let fuseOverlayfsPath;\n try {\n fuseOverlayfsPath = await io.which(\"fuse-overlayfs\");\n }\n catch (err) {\n core.debug(err);\n }\n\n return fuseOverlayfsPath;\n}\n\nexport function splitByNewline(s: string): string[] {\n return s.split(/\\r?\\n/);\n}\n\nexport function getArch(): string {\n // 'arch' should be used over 'archs', see https://github.com/redhat-actions/buildah-build/issues/60\n const archs = core.getInput(Inputs.ARCHS);\n const arch = core.getInput(Inputs.ARCH);\n\n if (arch && archs) {\n core.warning(\n `Both \"${Inputs.ARCH}\" and \"${Inputs.ARCHS}\" inputs are set. `\n + `Please use only one of these two inputs, as they are aliases of one another. `\n + `\"${Inputs.ARCH}\" takes precedence.`\n );\n }\n\n return arch || archs;\n}\n\nexport function getPlatform(): string {\n return core.getInput(Inputs.PLATFORM);\n}\n\nexport function getContainerfiles(): string[] {\n // 'containerfile' should be used over 'dockerfile',\n // see https://github.com/redhat-actions/buildah-build/issues/57\n const containerfiles = getInputList(Inputs.CONTAINERFILES);\n const dockerfiles = getInputList(Inputs.DOCKERFILES);\n\n if (containerfiles.length !== 0 && dockerfiles.length !== 0) {\n core.warning(\n `Both \"${Inputs.CONTAINERFILES}\" and \"${Inputs.DOCKERFILES}\" inputs are set. `\n + `Please use only one of these two inputs, as they are aliases of one another. `\n + `\"${Inputs.CONTAINERFILES}\" takes precedence.`\n );\n }\n\n return containerfiles.length !== 0 ? containerfiles : dockerfiles;\n}\n\nexport function getInputList(name: string): string[] {\n const items = core.getInput(name);\n if (!items) {\n return [];\n }\n const splitItems = splitByNewline(items);\n return splitItems\n .reduce(\n (acc, line) => acc.concat(line).map((item) => item.trim()),\n [],\n );\n}\n\nexport function isFullImageName(image: string): boolean {\n return image.indexOf(\":\") > 0;\n}\n\nexport function getFullImageName(image: string, tag: string): string {\n if (isFullImageName(tag)) {\n return tag;\n }\n return `${image}:${tag}`;\n}\n","module.exports = require(\"assert\");;","module.exports = require(\"child_process\");;","module.exports = require(\"events\");;","module.exports = require(\"fs\");;","module.exports = require(\"os\");;","module.exports = require(\"path\");;","module.exports = require(\"util\");;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\n__webpack_require__.ab = __dirname + \"/\";","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(144);\n"]} \ No newline at end of file +{"version":3,"sources":["../webpack:/buildah-build/node_modules/@actions/core/lib/command.js","../webpack:/buildah-build/node_modules/@actions/core/lib/core.js","../webpack:/buildah-build/node_modules/@actions/core/lib/file-command.js","../webpack:/buildah-build/node_modules/@actions/core/lib/utils.js","../webpack:/buildah-build/node_modules/@actions/exec/lib/exec.js","../webpack:/buildah-build/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/buildah-build/node_modules/@actions/io/lib/io-util.js","../webpack:/buildah-build/node_modules/@actions/io/lib/io.js","../webpack:/buildah-build/node_modules/ini/ini.js","../webpack:/buildah-build/src/buildah.ts","../webpack:/buildah-build/src/generated/inputs-outputs.ts","../webpack:/buildah-build/src/index.ts","../webpack:/buildah-build/src/utils.ts","../webpack:/buildah-build/external \"assert\"","../webpack:/buildah-build/external \"child_process\"","../webpack:/buildah-build/external \"events\"","../webpack:/buildah-build/external \"fs\"","../webpack:/buildah-build/external \"os\"","../webpack:/buildah-build/external \"path\"","../webpack:/buildah-build/external \"util\"","../webpack:/buildah-build/webpack/bootstrap","../webpack:/buildah-build/webpack/runtime/compat","../webpack:/buildah-build/webpack/startup"],"names":["__importStar","this","mod","__esModule","result","k","Object","hasOwnProperty","call","defineProperty","exports","value","os","__webpack_require__","utils_1","issueCommand","command","properties","message","cmd","Command","process","stdout","write","toString","EOL","issue","name","CMD_STRING","[object Object]","cmdStr","keys","length","first","key","val","escapeProperty","escapeData","s","toCommandValue","replace","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","command_1","file_command_1","path","ExitCode","exportVariable","convertedVal","env","filePath","delimiter","commandValue","setSecret","secret","addPath","inputPath","getInput","options","toUpperCase","required","Error","trim","setOutput","setCommandEcho","enabled","setFailed","exitCode","Failure","error","isDebug","debug","warning","info","startGroup","endGroup","group","fn","saveState","getState","fs","existsSync","appendFileSync","encoding","input","undefined","String","JSON","stringify","tr","exec","commandLine","args","commandArgs","argStringToArray","toolPath","slice","concat","runner","ToolRunner","events","child","io","ioUtil","IS_WINDOWS","platform","EventEmitter","super","listeners","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","a","windowsVerbatimArguments","_windowsQuoteCmdArg","data","strBuffer","onLine","n","indexOf","line","substring","err","_debug","argline","str","end","endsWith","upperToolPath","_endsWith","arg","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","char","some","x","reverse","quoteHit","i","split","join","includes","cwd","silent","failOnStdErr","ignoreReturnCode","delay","outStream","errStream","stderr","argv0","isRooted","which","optionsNonNull","_cloneExecOptions","_getCommandString","state","ExecState","on","fileName","cp","spawn","_getSpawnOptions","stdbuffer","_processLineBuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","code","processExitCode","emit","removeAllListeners","stdin","argString","inQuotes","escaped","append","c","charAt","push","timeout","_setResult","setTimeout","HandleTimeout","clearTimeout","_a","assert_1","promises","chmod","copyFile","lstat","mkdir","readdir","readlink","rename","rmdir","stat","symlink","unlink","exists","fsPath","isDirectory","useStat","stats","p","normalizeSeparators","startsWith","test","mkdirP","maxDepth","depth","ok","dirname","err2","tryGetExecutablePath","extensions","console","log","isFile","upperExt","extname","validExt","isUnixExecutable","originalFilePath","extension","directory","upperName","basename","actualName","mode","gid","getgid","uid","getuid","childProcess","util_1","promisify","source","dest","force","recursive","readCopyOptions","destStat","newDest","sourceStat","cpDirRecursive","relative","mv","destExists","rmRF","isDir","tool","check","PATHEXT","directories","PATH","sep","Boolean","sourceDir","destDir","currentDepth","files","srcFile","destFile","srcFileStat","isSymbolicLink","symlinkFull","prototype","eol","encode","obj","opt","children","out","section","whitespace","create","separator","Array","isArray","item","safe","nk","dotSplit","map","part","decode","re","lines","match","unsafe","keyRaw","valueRaw","parse","remove","parts","l","pop","nl","del","isQuoted","doUnesc","substr","_","esc","unesc","module","core","BuildahCli","executable","storageOptsEnv","isStorageDriverOverlay","fuseOverlayfsPath","findFuseOverlayfsPath","useOCI","image","context","containerFiles","buildArgs","arch","layers","extraArgs","forEach","file","buildArg","getImageFormatOption","execute","baseImage","container","contentToCopy","contentPath","content","settings","entrypoint","convertArrayToStringArg","port","envs","workingdir","newImageName","imageName","tags","tag","getFullImageName","arrayAsString","execOptions","finalExecOptions","groupName","execEnv","entries","STORAGE_OPTS","output","Inputs","Outputs","inputs_outputs_1","buildah_1","async","run","RUNNER_OS","buildahPath","cli","setStorageOptsEnv","DEFAULT_TAG","workspace","GITHUB_WORKSPACE","getContainerfiles","IMAGE","TAGS","tagsList","isFullImageNameTag","isFullImageName","newImage","OCI","getArch","getPlatform","doBuildUsingContainerFiles","doBuildFromScratch","IMAGE_WITH_TAG","CONTEXT","getInputList","BUILD_ARGS","containerFileAbsPaths","LAYERS","inputExtraArgsStr","EXTRA_ARGS","buildahBudExtraArgs","splitByNewline","flatMap","buildUsingDocker","BASE_IMAGE","CONTENT","ENTRYPOINT","PORT","workingDir","WORKDIR","ENVS","from","containerId","newImageConfig","config","copy","commit","catch","ini","fs_1","findStorageDriver","filePaths","storageDriver","fileExists","fileContent","readFile","storage","driver","xdgConfigHome","homedir","XDG_CONFIG_HOME","access","archs","ARCHS","ARCH","PLATFORM","containerfiles","CONTAINERFILES","dockerfiles","DOCKERFILES","items","splitItems","reduce","acc","require","__webpack_module_cache__","moduleId","threw","__webpack_modules__","ab","__dirname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5b,KAAAgU,EAAA9T,QAAA8T,EAAAA,EAAA9T,QAAAG,qBACAwb,EAAA,MACA,QACA,GAAAA,SAAAF,EAAAC,GAIA,OAAA5H,EAAA9T,QCzBAG,oBAAA0b,GAAAC,UAAA,ICEA,OAAA3b,oBAAA","file":"index.js","sourcesContent":["\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n const delimiter = '_GitHubActionsFileCommandDelimeter_';\n const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;\n file_command_1.issueCommand('ENV', commandValue);\n }\n else {\n command_1.issueCommand('set-env', { name }, convertedVal);\n }\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n */\nfunction error(message) {\n command_1.issue('error', message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n */\nfunction warning(message) {\n command_1.issue('warning', message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueCommand = issueCommand;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n strBuffer = s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n const stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n const errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n });\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = 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}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = require(\"assert\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\nexports.IS_WINDOWS = process.platform === 'win32';\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Recursively create a directory at `fsPath`.\n *\n * This implementation is optimistic, meaning it attempts to create the full\n * path first, and backs up the path stack from there.\n *\n * @param fsPath The path to create\n * @param maxDepth The maximum recursion depth\n * @param depth The current recursion depth\n */\nfunction mkdirP(fsPath, maxDepth = 1000, depth = 1) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n fsPath = path.resolve(fsPath);\n if (depth >= maxDepth)\n return exports.mkdir(fsPath);\n try {\n yield exports.mkdir(fsPath);\n return;\n }\n catch (err) {\n switch (err.code) {\n case 'ENOENT': {\n yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);\n yield exports.mkdir(fsPath);\n return;\n }\n default: {\n let stats;\n try {\n stats = yield exports.stat(fsPath);\n }\n catch (err2) {\n throw err;\n }\n if (!stats.isDirectory())\n throw err;\n }\n }\n }\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst childProcess = require(\"child_process\");\nconst path = require(\"path\");\nconst util_1 = require(\"util\");\nconst ioUtil = require(\"./io-util\");\nconst exec = util_1.promisify(childProcess.exec);\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory()\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another\n // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.\n try {\n if (yield ioUtil.isDirectory(inputPath, true)) {\n yield exec(`rd /s /q \"${inputPath}\"`);\n }\n else {\n yield exec(`del /f /a \"${inputPath}\"`);\n }\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n // Shelling out fails to remove a symlink folder with missing source, this unlink catches that\n try {\n yield ioUtil.unlink(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n }\n else {\n let isDir = false;\n try {\n isDir = yield ioUtil.isDirectory(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n return;\n }\n if (isDir) {\n yield exec(`rm -rf \"${inputPath}\"`);\n }\n else {\n yield ioUtil.unlink(inputPath);\n }\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n yield ioUtil.mkdirP(fsPath);\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n }\n }\n try {\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env.PATHEXT) {\n for (const extension of process.env.PATHEXT.split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return filePath;\n }\n return '';\n }\n // if any path separators, return empty\n if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\\\'))) {\n return '';\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // return the first match\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions);\n if (filePath) {\n return filePath;\n }\n }\n return '';\n }\n catch (err) {\n throw new Error(`which failed with message ${err.message}`);\n }\n });\n}\nexports.which = which;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n return { force, recursive };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","const { hasOwnProperty } = Object.prototype\n\nconst eol = typeof process !== 'undefined' &&\n process.platform === 'win32' ? '\\r\\n' : '\\n'\n\nconst encode = (obj, opt) => {\n const children = []\n let out = ''\n\n if (typeof opt === 'string') {\n opt = {\n section: opt,\n whitespace: false,\n }\n } else {\n opt = opt || Object.create(null)\n opt.whitespace = opt.whitespace === true\n }\n\n const separator = opt.whitespace ? ' = ' : '='\n\n for (const k of Object.keys(obj)) {\n const val = obj[k]\n if (val && Array.isArray(val)) {\n for (const item of val)\n out += safe(k + '[]') + separator + safe(item) + '\\n'\n } else if (val && typeof val === 'object')\n children.push(k)\n else\n out += safe(k) + separator + safe(val) + eol\n }\n\n if (opt.section && out.length)\n out = '[' + safe(opt.section) + ']' + eol + out\n\n for (const k of children) {\n const nk = dotSplit(k).join('\\\\.')\n const section = (opt.section ? opt.section + '.' : '') + nk\n const { whitespace } = opt\n const child = encode(obj[k], {\n section,\n whitespace,\n })\n if (out.length && child.length)\n out += eol\n\n out += child\n }\n\n return out\n}\n\nconst dotSplit = str =>\n str.replace(/\\1/g, '\\u0002LITERAL\\\\1LITERAL\\u0002')\n .replace(/\\\\\\./g, '\\u0001')\n .split(/\\./)\n .map(part =>\n part.replace(/\\1/g, '\\\\.')\n .replace(/\\2LITERAL\\\\1LITERAL\\2/g, '\\u0001'))\n\nconst decode = str => {\n const out = Object.create(null)\n let p = out\n let section = null\n // section |key = value\n const re = /^\\[([^\\]]*)\\]$|^([^=]+)(=(.*))?$/i\n const lines = str.split(/[\\r\\n]+/g)\n\n for (const line of lines) {\n if (!line || line.match(/^\\s*[;#]/))\n continue\n const match = line.match(re)\n if (!match)\n continue\n if (match[1] !== undefined) {\n section = unsafe(match[1])\n if (section === '__proto__') {\n // not allowed\n // keep parsing the section, but don't attach it.\n p = Object.create(null)\n continue\n }\n p = out[section] = out[section] || Object.create(null)\n continue\n }\n const keyRaw = unsafe(match[2])\n const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]'\n const key = isArray ? keyRaw.slice(0, -2) : keyRaw\n if (key === '__proto__')\n continue\n const valueRaw = match[3] ? unsafe(match[4]) : true\n const value = valueRaw === 'true' ||\n valueRaw === 'false' ||\n valueRaw === 'null' ? JSON.parse(valueRaw)\n : valueRaw\n\n // Convert keys with '[]' suffix to an array\n if (isArray) {\n if (!hasOwnProperty.call(p, key))\n p[key] = []\n else if (!Array.isArray(p[key]))\n p[key] = [p[key]]\n }\n\n // safeguard against resetting a previously defined\n // array by accidentally forgetting the brackets\n if (Array.isArray(p[key]))\n p[key].push(value)\n else\n p[key] = value\n }\n\n // {a:{y:1},\"a.b\":{x:2}} --> {a:{y:1,b:{x:2}}}\n // use a filter to return the keys that have to be deleted.\n const remove = []\n for (const k of Object.keys(out)) {\n if (!hasOwnProperty.call(out, k) ||\n typeof out[k] !== 'object' ||\n Array.isArray(out[k]))\n continue\n\n // see if the parent section is also an object.\n // if so, add it to that, and mark this one for deletion\n const parts = dotSplit(k)\n let p = out\n const l = parts.pop()\n const nl = l.replace(/\\\\\\./g, '.')\n for (const part of parts) {\n if (part === '__proto__')\n continue\n if (!hasOwnProperty.call(p, part) || typeof p[part] !== 'object')\n p[part] = Object.create(null)\n p = p[part]\n }\n if (p === out && nl === l)\n continue\n\n p[nl] = out[k]\n remove.push(k)\n }\n for (const del of remove)\n delete out[del]\n\n return out\n}\n\nconst isQuoted = val =>\n (val.charAt(0) === '\"' && val.slice(-1) === '\"') ||\n (val.charAt(0) === \"'\" && val.slice(-1) === \"'\")\n\nconst safe = val =>\n (typeof val !== 'string' ||\n val.match(/[=\\r\\n]/) ||\n val.match(/^\\[/) ||\n (val.length > 1 &&\n isQuoted(val)) ||\n val !== val.trim())\n ? JSON.stringify(val)\n : val.replace(/;/g, '\\\\;').replace(/#/g, '\\\\#')\n\nconst unsafe = (val, doUnesc) => {\n val = (val || '').trim()\n if (isQuoted(val)) {\n // remove the single quotes before calling JSON.parse\n if (val.charAt(0) === \"'\")\n val = val.substr(1, val.length - 2)\n\n try {\n val = JSON.parse(val)\n } catch (_) {}\n } else {\n // walk the val to find the first not-escaped ; character\n let esc = false\n let unesc = ''\n for (let i = 0, l = val.length; i < l; i++) {\n const c = val.charAt(i)\n if (esc) {\n if ('\\\\;#'.indexOf(c) !== -1)\n unesc += c\n else\n unesc += '\\\\' + c\n\n esc = false\n } else if (';#'.indexOf(c) !== -1)\n break\n else if (c === '\\\\')\n esc = true\n else\n unesc += c\n }\n if (esc)\n unesc += '\\\\'\n\n return unesc.trim()\n }\n return val\n}\n\nmodule.exports = {\n parse: decode,\n decode,\n stringify: encode,\n encode,\n safe,\n unsafe,\n}\n","/***************************************************************************************************\n * Copyright (c) Red Hat, Inc. All rights reserved.\n * Licensed under the MIT License. See LICENSE file in the project root for license information.\n **************************************************************************************************/\n\nimport * as core from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport * as path from \"path\";\nimport CommandResult from \"./types\";\nimport { isStorageDriverOverlay, findFuseOverlayfsPath, getFullImageName } from \"./utils\";\n\nexport interface BuildahConfigSettings {\n entrypoint?: string[];\n envs?: string[];\n port?: string;\n workingdir?: string;\n arch?: string;\n}\n\ninterface Buildah {\n buildUsingDocker(\n image: string, context: string, containerFiles: string[], buildArgs: string[],\n useOCI: boolean, arch: string, platform: string, layers: string, extraArgs: string[]\n ): Promise;\n from(baseImage: string): Promise;\n config(container: string, setting: BuildahConfigSettings): Promise;\n copy(container: string, contentToCopy: string[]): Promise;\n commit(container: string, newImageName: string, useOCI: boolean): Promise;\n}\n\nexport class BuildahCli implements Buildah {\n private readonly executable: string;\n\n public storageOptsEnv = \"\";\n\n constructor(executable: string) {\n this.executable = executable;\n }\n\n // Checks for storage driver if found \"overlay\",\n // then checks if \"fuse-overlayfs\" is installed.\n // If yes, add mount program to use \"fuse-overlayfs\"\n async setStorageOptsEnv(): Promise {\n if (await isStorageDriverOverlay()) {\n const fuseOverlayfsPath = await findFuseOverlayfsPath();\n if (fuseOverlayfsPath) {\n core.info(`Overriding storage mount_program with \"fuse-overlayfs\" in environment`);\n this.storageOptsEnv = `overlay.mount_program=${fuseOverlayfsPath}`;\n }\n else {\n core.warning(`\"fuse-overlayfs\" is not found. Install it before running this action. `\n + `For more detail see https://github.com/redhat-actions/buildah-build/issues/45`);\n }\n }\n else {\n core.info(\"Storage driver is not 'overlay', so not overriding storage configuration\");\n }\n }\n\n private static getImageFormatOption(useOCI: boolean): string[] {\n return [ \"--format\", useOCI ? \"oci\" : \"docker\" ];\n }\n\n async buildUsingDocker(\n image: string, context: string, containerFiles: string[], buildArgs: string[],\n useOCI: boolean, arch: string, platform: string, layers: string, extraArgs: string[]\n ): Promise {\n const args: string[] = [ \"bud\" ];\n if (arch) {\n args.push(\"--arch\");\n args.push(arch);\n }\n if (platform) {\n args.push(\"--platform\");\n args.push(platform);\n }\n containerFiles.forEach((file) => {\n args.push(\"-f\");\n args.push(file);\n });\n buildArgs.forEach((buildArg) => {\n args.push(\"--build-arg\");\n args.push(buildArg);\n });\n args.push(...BuildahCli.getImageFormatOption(useOCI));\n if (layers) {\n args.push(`--layers=${layers}`);\n }\n if (extraArgs.length > 0) {\n args.push(...extraArgs);\n }\n args.push(\"-t\");\n args.push(image);\n args.push(context);\n return this.execute(args);\n }\n\n async from(baseImage: string): Promise {\n return this.execute([ \"from\", baseImage ]);\n }\n\n async copy(container: string, contentToCopy: string[], contentPath?: string): Promise {\n if (contentToCopy.length === 0) {\n return undefined;\n }\n\n core.debug(\"copy\");\n core.debug(container);\n for (const content of contentToCopy) {\n const args: string[] = [ \"copy\", container, content ];\n if (contentPath) {\n args.push(contentPath);\n }\n return this.execute(args);\n }\n\n return undefined;\n }\n\n async config(container: string, settings: BuildahConfigSettings): Promise {\n core.debug(\"config\");\n core.debug(container);\n const args: string[] = [ \"config\" ];\n if (settings.entrypoint) {\n args.push(\"--entrypoint\");\n args.push(BuildahCli.convertArrayToStringArg(settings.entrypoint));\n }\n if (settings.port) {\n args.push(\"--port\");\n args.push(settings.port);\n }\n if (settings.envs) {\n settings.envs.forEach((env) => {\n args.push(\"--env\");\n args.push(env);\n });\n }\n if (settings.arch) {\n args.push(\"--arch\");\n args.push(settings.arch);\n }\n if (settings.workingdir) {\n args.push(\"--workingdir\");\n args.push(settings.workingdir);\n }\n args.push(container);\n return this.execute(args);\n }\n\n async commit(container: string, newImageName: string, useOCI: boolean): Promise {\n core.debug(\"commit\");\n core.debug(container);\n core.debug(newImageName);\n const args: string[] = [\n \"commit\", ...BuildahCli.getImageFormatOption(useOCI),\n \"--squash\", container, newImageName,\n ];\n return this.execute(args);\n }\n\n async tag(imageName: string, tags: string[]): Promise {\n const args: string[] = [ \"tag\" ];\n for (const tag of tags) {\n args.push(getFullImageName(imageName, tag));\n }\n core.info(`Tagging the built image with tags ${tags.toString()}`);\n return this.execute(args);\n }\n\n private static convertArrayToStringArg(args: string[]): string {\n let arrayAsString = \"[\";\n args.forEach((arg) => {\n arrayAsString += `\"${arg}\",`;\n });\n return `${arrayAsString.slice(0, -1)}]`;\n }\n\n async execute(\n args: string[],\n execOptions: exec.ExecOptions & { group?: boolean } = {},\n ): Promise {\n // ghCore.info(`${EXECUTABLE} ${args.join(\" \")}`)\n\n let stdout = \"\";\n let stderr = \"\";\n\n const finalExecOptions = { ...execOptions };\n finalExecOptions.ignoreReturnCode = true; // the return code is processed below\n\n finalExecOptions.listeners = {\n stdline: (line): void => {\n stdout += line + \"\\n\";\n },\n errline: (line):void => {\n stderr += line + \"\\n\";\n },\n };\n\n if (execOptions.group) {\n const groupName = [ this.executable, ...args ].join(\" \");\n core.startGroup(groupName);\n }\n\n // To solve https://github.com/redhat-actions/buildah-build/issues/45\n const execEnv: { [key: string] : string } = {};\n Object.entries(process.env).forEach(([ key, value ]) => {\n if (value != null) {\n execEnv[key] = value;\n }\n });\n\n if (this.storageOptsEnv) {\n execEnv.STORAGE_OPTS = this.storageOptsEnv;\n }\n\n finalExecOptions.env = execEnv;\n\n try {\n const exitCode = await exec.exec(this.executable, args, finalExecOptions);\n\n if (execOptions.ignoreReturnCode !== true && exitCode !== 0) {\n // Throwing the stderr as part of the Error makes the stderr\n // show up in the action outline, which saves some clicking when debugging.\n let error = `${path.basename(this.executable)} exited with code ${exitCode}`;\n if (stderr) {\n error += `\\n${stderr}`;\n }\n throw new Error(error);\n }\n\n return {\n exitCode, output: stdout, error: stderr,\n };\n }\n\n finally {\n if (execOptions.group) {\n core.endGroup();\n }\n }\n }\n}\n","// This file was auto-generated by action-io-generator. Do not edit by hand!\nexport enum Inputs {\n /**\n * Label the image with this ARCH, instead of defaulting to the host architecture.\n * Required: false\n * Default: None.\n */\n ARCH = \"arch\",\n /**\n * Alias for \"arch\". \"arch\" takes precedence if both are set.\n * Required: false\n * Default: None.\n */\n ARCHS = \"archs\",\n /**\n * The base image to use to create a new container image\n * Required: false\n * Default: None.\n */\n BASE_IMAGE = \"base-image\",\n /**\n * List of --build-args to pass to buildah\n * Required: false\n * Default: None.\n */\n BUILD_ARGS = \"build-args\",\n /**\n * List of Containerfile paths (eg: ./Containerfile)\n * Required: false\n * Default: None.\n */\n CONTAINERFILES = \"containerfiles\",\n /**\n * List of files/directories to copy inside the base image\n * Required: false\n * Default: None.\n */\n CONTENT = \"content\",\n /**\n * Path of the directory to use as context (default: .)\n * Required: false\n * Default: \".\"\n */\n CONTEXT = \"context\",\n /**\n * Alias for \"containerfiles\". \"containerfiles\" takes precedence if both are set.\n * Required: false\n * Default: None.\n */\n DOCKERFILES = \"dockerfiles\",\n /**\n * The entry point to set for containers based on image\n * Required: false\n * Default: None.\n */\n ENTRYPOINT = \"entrypoint\",\n /**\n * List of environment variables to be set when running containers based on image\n * Required: false\n * Default: None.\n */\n ENVS = \"envs\",\n /**\n * Extra args to be passed to buildah bud.\n * Separate arguments by newline. Do not use quotes - @actions/exec will do the quoting for you.\n * Required: false\n * Default: None.\n */\n EXTRA_ARGS = \"extra-args\",\n /**\n * The name (reference) of the image to build\n * Required: false\n * Default: None.\n */\n IMAGE = \"image\",\n /**\n * Set to true to cache intermediate layers during build process\n * Required: false\n * Default: None.\n */\n LAYERS = \"layers\",\n /**\n * Set to true to build using the OCI image format instead of the Docker image format\n * Required: false\n * Default: \"false\"\n */\n OCI = \"oci\",\n /**\n * Label the image with this PLATFORM, instead of defaulting to the host platform.\n * Only supported for containerfile builds.\n * Required: false\n * Default: None.\n */\n PLATFORM = \"platform\",\n /**\n * The port to expose when running containers based on image\n * Required: false\n * Default: None.\n */\n PORT = \"port\",\n /**\n * The tags of the image to build. For multiple tags, seperate by whitespace. For example, \"latest v1\".\n * Required: false\n * Default: \"latest\"\n */\n TAGS = \"tags\",\n /**\n * The working directory to use within the container\n * Required: false\n * Default: None.\n */\n WORKDIR = \"workdir\",\n}\n\nexport enum Outputs {\n /**\n * Name of the image built\n * Required: false\n * Default: None.\n */\n IMAGE = \"image\",\n /**\n * Name of the image tagged with the first tag present\n * Required: false\n * Default: None.\n */\n IMAGE_WITH_TAG = \"image-with-tag\",\n /**\n * List of the tags that were created, separated by spaces\n * Required: false\n * Default: None.\n */\n TAGS = \"tags\",\n}\n","/***************************************************************************************************\n * Copyright (c) Red Hat, Inc. All rights reserved.\n * Licensed under the MIT License. See LICENSE file in the project root for license information.\n **************************************************************************************************/\n\nimport * as core from \"@actions/core\";\nimport * as io from \"@actions/io\";\nimport * as path from \"path\";\nimport { Inputs, Outputs } from \"./generated/inputs-outputs\";\nimport { BuildahCli, BuildahConfigSettings } from \"./buildah\";\nimport {\n getArch, getPlatform, getContainerfiles, getInputList, splitByNewline,\n isFullImageName, getFullImageName,\n} from \"./utils\";\n\nexport async function run(): Promise {\n if (process.env.RUNNER_OS !== \"Linux\") {\n throw new Error(\"buildah, and therefore this action, only works on Linux. Please use a Linux runner.\");\n }\n\n // get buildah cli\n const buildahPath = await io.which(\"buildah\", true);\n const cli: BuildahCli = new BuildahCli(buildahPath);\n\n // print buildah version\n await cli.execute([ \"version\" ], { group: true });\n\n // Check if fuse-overlayfs exists and find the storage driver\n await cli.setStorageOptsEnv();\n\n const DEFAULT_TAG = \"latest\";\n const workspace = process.env.GITHUB_WORKSPACE || process.cwd();\n const containerFiles = getContainerfiles();\n const image = core.getInput(Inputs.IMAGE);\n const tags = core.getInput(Inputs.TAGS);\n const tagsList: string[] = tags.trim().split(/\\s+/);\n\n // info message if user doesn't provides any tag\n if (tagsList.length === 0) {\n core.info(`Input \"${Inputs.TAGS}\" is not provided, using default tag \"${DEFAULT_TAG}\"`);\n tagsList.push(DEFAULT_TAG);\n }\n\n // check if all tags provided are in `image:tag` format\n const isFullImageNameTag = isFullImageName(tagsList[0]);\n if (tagsList.some((tag) => isFullImageName(tag) !== isFullImageNameTag)) {\n throw new Error(`Input \"${Inputs.TAGS}\" cannot have a mix of full name and non full name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`);\n }\n if (!isFullImageNameTag && !image) {\n throw new Error(`Input \"${Inputs.IMAGE}\" must be provided when not using full image name tags. Refer to https://github.com/redhat-actions/buildah-build#image-tag-inputs`);\n }\n\n const newImage = getFullImageName(image, tagsList[0]);\n const useOCI = core.getInput(Inputs.OCI) === \"true\";\n\n const arch = getArch();\n const platform = getPlatform();\n\n if (arch && platform) {\n throw new Error(\"The --platform option may not be used in combination with the --arch option.\");\n }\n\n if (containerFiles.length !== 0) {\n await doBuildUsingContainerFiles(cli, newImage, workspace, containerFiles, useOCI, arch, platform);\n }\n else {\n if (platform) {\n throw new Error(\"The --platform option is not supported for builds without containerfiles.\");\n }\n await doBuildFromScratch(cli, newImage, useOCI, arch);\n }\n\n if (tagsList.length > 1) {\n await cli.tag(image, tagsList);\n }\n core.setOutput(Outputs.IMAGE, image);\n core.setOutput(Outputs.TAGS, tags);\n core.setOutput(Outputs.IMAGE_WITH_TAG, newImage);\n}\n\nasync function doBuildUsingContainerFiles(\n cli: BuildahCli, newImage: string, workspace: string, containerFiles: string[], useOCI: boolean, arch: string,\n platform: string\n): Promise {\n if (containerFiles.length === 1) {\n core.info(`Performing build from Containerfile`);\n }\n else {\n core.info(`Performing build from ${containerFiles.length} Containerfiles`);\n }\n\n const context = path.join(workspace, core.getInput(Inputs.CONTEXT));\n const buildArgs = getInputList(Inputs.BUILD_ARGS);\n const containerFileAbsPaths = containerFiles.map((file) => path.join(workspace, file));\n const layers = core.getInput(Inputs.LAYERS);\n\n const inputExtraArgsStr = core.getInput(Inputs.EXTRA_ARGS);\n let buildahBudExtraArgs: string[] = [];\n if (inputExtraArgsStr) {\n // transform the array of lines into an array of arguments\n // by splitting over lines, then over spaces, then trimming.\n const lines = splitByNewline(inputExtraArgsStr);\n buildahBudExtraArgs = lines.flatMap((line) => line.split(\" \")).map((arg) => arg.trim());\n }\n await cli.buildUsingDocker(\n newImage, context, containerFileAbsPaths, buildArgs, useOCI, arch, platform, layers, buildahBudExtraArgs\n );\n}\n\nasync function doBuildFromScratch(\n cli: BuildahCli, newImage: string, useOCI: boolean, arch: string\n): Promise {\n core.info(`Performing build from scratch`);\n\n const baseImage = core.getInput(Inputs.BASE_IMAGE, { required: true });\n const content = getInputList(Inputs.CONTENT);\n const entrypoint = getInputList(Inputs.ENTRYPOINT);\n const port = core.getInput(Inputs.PORT);\n const workingDir = core.getInput(Inputs.WORKDIR);\n const envs = getInputList(Inputs.ENVS);\n\n const container = await cli.from(baseImage);\n const containerId = container.output.replace(\"\\n\", \"\");\n\n const newImageConfig: BuildahConfigSettings = {\n entrypoint,\n port,\n workingdir: workingDir,\n envs,\n arch,\n };\n await cli.config(containerId, newImageConfig);\n await cli.copy(containerId, content);\n await cli.commit(containerId, newImage, useOCI);\n}\n\nrun().catch(core.setFailed);\n","/***************************************************************************************************\n * Copyright (c) Red Hat, Inc. All rights reserved.\n * Licensed under the MIT License. See LICENSE file in the project root for license information.\n **************************************************************************************************/\n\nimport * as ini from \"ini\";\nimport { promises as fs } from \"fs\";\nimport * as core from \"@actions/core\";\nimport * as path from \"path\";\nimport * as io from \"@actions/io\";\nimport * as os from \"os\";\nimport { Inputs } from \"./generated/inputs-outputs\";\n\nasync function findStorageDriver(filePaths: string[]): Promise {\n let storageDriver = \"\";\n for (const filePath of filePaths) {\n core.debug(`Checking if the storage file exists at ${filePath}`);\n if (await fileExists(filePath)) {\n core.debug(`Storage file exists at ${filePath}`);\n const fileContent = ini.parse(await fs.readFile(filePath, \"utf-8\"));\n if (fileContent.storage.driver) {\n storageDriver = fileContent.storage.driver;\n }\n }\n }\n return storageDriver;\n}\n\nexport async function isStorageDriverOverlay(): Promise {\n let xdgConfigHome = path.join(os.homedir(), \".config\");\n if (process.env.XDG_CONFIG_HOME) {\n xdgConfigHome = process.env.XDG_CONFIG_HOME;\n }\n const filePaths: string[] = [\n \"/etc/containers/storage.conf\",\n path.join(xdgConfigHome, \"containers/storage.conf\"),\n ];\n const storageDriver = await findStorageDriver(filePaths);\n return (storageDriver === \"overlay\");\n}\n\nasync function fileExists(filePath: string): Promise {\n try {\n await fs.access(filePath);\n return true;\n }\n catch (err) {\n return false;\n }\n}\n\nexport async function findFuseOverlayfsPath(): Promise {\n let fuseOverlayfsPath;\n try {\n fuseOverlayfsPath = await io.which(\"fuse-overlayfs\");\n }\n catch (err) {\n core.debug(err);\n }\n\n return fuseOverlayfsPath;\n}\n\nexport function splitByNewline(s: string): string[] {\n return s.split(/\\r?\\n/);\n}\n\nexport function getArch(): string {\n // 'arch' should be used over 'archs', see https://github.com/redhat-actions/buildah-build/issues/60\n const archs = core.getInput(Inputs.ARCHS);\n const arch = core.getInput(Inputs.ARCH);\n\n if (arch && archs) {\n core.warning(\n `Both \"${Inputs.ARCH}\" and \"${Inputs.ARCHS}\" inputs are set. `\n + `Please use only one of these two inputs, as they are aliases of one another. `\n + `\"${Inputs.ARCH}\" takes precedence.`\n );\n }\n\n return arch || archs;\n}\n\nexport function getPlatform(): string {\n return core.getInput(Inputs.PLATFORM);\n}\n\nexport function getContainerfiles(): string[] {\n // 'containerfile' should be used over 'dockerfile',\n // see https://github.com/redhat-actions/buildah-build/issues/57\n const containerfiles = getInputList(Inputs.CONTAINERFILES);\n const dockerfiles = getInputList(Inputs.DOCKERFILES);\n\n if (containerfiles.length !== 0 && dockerfiles.length !== 0) {\n core.warning(\n `Both \"${Inputs.CONTAINERFILES}\" and \"${Inputs.DOCKERFILES}\" inputs are set. `\n + `Please use only one of these two inputs, as they are aliases of one another. `\n + `\"${Inputs.CONTAINERFILES}\" takes precedence.`\n );\n }\n\n return containerfiles.length !== 0 ? containerfiles : dockerfiles;\n}\n\nexport function getInputList(name: string): string[] {\n const items = core.getInput(name);\n if (!items) {\n return [];\n }\n const splitItems = splitByNewline(items);\n return splitItems\n .reduce(\n (acc, line) => acc.concat(line).map((item) => item.trim()),\n [],\n );\n}\n\nexport function isFullImageName(image: string): boolean {\n return image.indexOf(\":\") > 0;\n}\n\nexport function getFullImageName(image: string, tag: string): string {\n if (isFullImageName(tag)) {\n return tag;\n }\n return `${image}:${tag}`;\n}\n","module.exports = require(\"assert\");;","module.exports = require(\"child_process\");;","module.exports = require(\"events\");;","module.exports = require(\"fs\");;","module.exports = require(\"os\");;","module.exports = require(\"path\");;","module.exports = require(\"util\");;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\n__webpack_require__.ab = __dirname + \"/\";","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(144);\n"]} \ No newline at end of file diff --git a/src/buildah.ts b/src/buildah.ts index 534adf1..dab5d0b 100644 --- a/src/buildah.ts +++ b/src/buildah.ts @@ -15,7 +15,6 @@ export interface BuildahConfigSettings { port?: string; workingdir?: string; arch?: string; - platform?: string; } interface Buildah { @@ -140,10 +139,6 @@ export class BuildahCli implements Buildah { args.push("--arch"); args.push(settings.arch); } - if (settings.platform) { - args.push("--platform"); - args.push(settings.platform); - } if (settings.workingdir) { args.push("--workingdir"); args.push(settings.workingdir); diff --git a/src/generated/inputs-outputs.ts b/src/generated/inputs-outputs.ts index c230bd6..517d72e 100644 --- a/src/generated/inputs-outputs.ts +++ b/src/generated/inputs-outputs.ts @@ -87,6 +87,7 @@ export enum Inputs { OCI = "oci", /** * Label the image with this PLATFORM, instead of defaulting to the host platform. + * Only supported for containerfile builds. * Required: false * Default: None. */ diff --git a/src/index.ts b/src/index.ts index a0114ef..c47218a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,7 +64,10 @@ export async function run(): Promise { await doBuildUsingContainerFiles(cli, newImage, workspace, containerFiles, useOCI, arch, platform); } else { - await doBuildFromScratch(cli, newImage, useOCI, arch, platform); + if (platform) { + throw new Error("The --platform option is not supported for builds without containerfiles."); + } + await doBuildFromScratch(cli, newImage, useOCI, arch); } if (tagsList.length > 1) { @@ -105,7 +108,7 @@ async function doBuildUsingContainerFiles( } async function doBuildFromScratch( - cli: BuildahCli, newImage: string, useOCI: boolean, arch: string, platform: string + cli: BuildahCli, newImage: string, useOCI: boolean, arch: string ): Promise { core.info(`Performing build from scratch`); @@ -125,7 +128,6 @@ async function doBuildFromScratch( workingdir: workingDir, envs, arch, - platform, }; await cli.config(containerId, newImageConfig); await cli.copy(containerId, content);