diff --git a/.github/workflows/multiple-build.yaml b/.github/workflows/multiple-build.yaml index de9500b..147202e 100644 --- a/.github/workflows/multiple-build.yaml +++ b/.github/workflows/multiple-build.yaml @@ -10,95 +10,20 @@ env: IMAGE_NAMESPACE: redhat-github-actions IMAGE_NAME: ptr-test IMAGE_TAG: v1 + SHORT_IMAGE_NAME_TAG: ptr-test:v1 + FULLY_QUALIFIED_IMAGE_NAME_TAG: quay.io/redhat-github-actions/ptr-test:v1 jobs: - build-only-podman: - name: Build and push image built only on Podman - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - install_latest: [ true, false ] - - steps: - - # Checkout push-to-registry action github repository - - name: Checkout Push to Registry action - uses: actions/checkout@v2 - - - name: Install latest podman - if: matrix.install_latest - run: | - bash .github/install_latest_podman.sh - - - name: Build image using Podman - run: | - podman build -t ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} -<:` form** +| tags | The tag or tags of the image to push. For multiple tags, separate by whitespace. For example, `latest ${{ github.sha }}`. For multiple image names, specify tags in `:` form. For example, `quay.io/podman/stable:latest quay.io/containers/podman:latest` | `latest` +| registry | Hostname and optional namespace to push the image to. Eg. `quay.io` or `quay.io/username`. See the note below about naming image and registry. | **Required unless tags are provided in `:` form** | username | Username with which to authenticate to the registry. Required unless already logged in to the registry. | None | password | Password, encrypted password, or access token to use to log in to the registry. Required unless already logged in to the registry. | None | tls-verify | Verify TLS certificates when contacting the registry. Set to `false` to skip certificate verification. | `true` | digestfile | After copying the image, write the digest of the resulting image to the file. The contents of this file are the digest output. | Auto-generated from image and tag | extra-args | Extra args to be passed to podman push. Separate arguments by newline. Do not use quotes. | None -**NOTE**: You can provide the registry namespace (usually your username, or organization) either as a suffix to input `registry` (eg. `quay.io/username`) or as a prefix to input `image` (eg. `username/myimage`), but not in both. The full image path will be resolved from `/`. +**NOTE**: You can provide the registry namespace (usually your username, or organization) either as a suffix to input `registry` (eg. `quay.io/username`) or as a prefix to input `image` (eg. `username/myimage`), but not in both. The full image path will be resolved from `/`. Alternatively, you can provide input `tags` as `:` with repository in fully qualified image name (FQIN) form (e.g. `quay.io/username/myimage:latest`). When FQIN tags are provided, input `image` and `registry` will be ignored. ## Action Outputs diff --git a/action.yml b/action.yml index 91e1c3e..b1d63b9 100644 --- a/action.yml +++ b/action.yml @@ -7,14 +7,14 @@ branding: inputs: image: description: 'Name of the image to push (e.g. username/imagename or imagename)' - required: true + required: false tags: - description: 'The tag or tags of the image to push. For multiple tags, seperate by a space. For example, "latest v1"' + description: 'The tag or tags of the image to push. For multiple tags, seperate by whitespace. For example, "latest v1"' required: false default: 'latest' registry: description: 'Hostname and optional namespace to push the image to (eg. quay.io/username or quay.io)' - required: true + required: false username: description: 'Username to use as credential to authenticate to the registry' required: false diff --git a/dist/index.js b/dist/index.js index 64cb53b..b020fb5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -require('./sourcemap-register.js');module.exports=(()=>{"use strict";var e={351:function(e,t,n){var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(n(87));const r=n(278);function issueCommand(e,t,n){const i=new Command(e,t,n);process.stdout.write(i.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const o="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const i=this.properties[n];if(i){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(i)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return r.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return r.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__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(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(l=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=u.toCommandValue(t);process.env[e]=n;const i=process.env["GITHUB_ENV"]||"";if(i){const t="_GitHubActionsFileCommandDelimeter_";const i=`${e}<<${t}${c.EOL}${n}${c.EOL}${t}`;o.issueCommand("ENV",i)}else{r.issueCommand("set-env",{name:e},n)}}t.exportVariable=exportVariable;function setSecret(e){r.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){o.issueCommand("PATH",e)}else{r.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${a.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}return n.trim()}t.getInput=getInput;function setOutput(e,t){r.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){r.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=l.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){r.issueCommand("debug",{},e)}t.debug=debug;function error(e){r.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){r.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+c.EOL)}t.info=info;function startGroup(e){r.issue("group",e)}t.startGroup=startGroup;function endGroup(){r.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n})}t.group=group;function saveState(e,t){r.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},717:function(e,t,n){var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(n(747));const r=i(n(87));const o=n(278);function issueCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!s.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}s.appendFileSync(n,`${o.toCommandValue(t)}${r.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},278:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},514:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const r=s(n(159));function exec(e,t,n){return i(this,void 0,void 0,function*(){const i=r.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const s=i[0];t=i.slice(1).concat(t||[]);const o=new r.ToolRunner(s,t,n);return o.exec()})}t.exec=exec},159:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__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(e,t,n){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=n||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const n=this._getSpawnFileName();const i=this._getSpawnArgs(e);let s=t?"":"[command]";if(f){if(this._isCmdFile()){s+=n;for(const e of i){s+=` ${e}`}}else if(e.windowsVerbatimArguments){s+=`"${n}"`;for(const e of i){s+=` ${e}`}}else{s+=this._windowsQuoteCmdArg(n);for(const e of i){s+=` ${this._windowsQuoteCmdArg(e)}`}}}else{s+=n;for(const e of i){s+=` ${e}`}}return s}_processLineBuffer(e,t,n){try{let i=t+e.toString();let s=i.indexOf(r.EOL);while(s>-1){const e=i.substring(0,s);n(e);i=i.substring(s+r.EOL.length);s=i.indexOf(r.EOL)}t=i}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const n of this.args){t+=" ";t+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let n=false;for(const i of e){if(t.some(e=>e===i)){n=true;break}}if(!n){return e}let i='"';let s=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(s&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){s=true;i+='"'}else{s=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let n=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(n&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){n=true;t+="\\"}else{n=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const n={};n.cwd=e.cwd;n.env=e.env;n["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){n.argv0=`"${t}"`}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((e,t)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}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",e=>{this._debug(e)});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",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!n.silent&&n.outStream){n.outStream.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const a="";if(o.stderr){o.stderr.on("data",e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!n.silent&&n.errStream&&n.outStream){const t=n.failOnStdErr?n.errStream:n.outStream;t.write(e)}this._processLineBuffer(e,a,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}o.on("error",e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()});o.on("exit",e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()});o.on("close",e=>{i.processExitCode=e;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){t(n)}else{e(i)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let n=false;let i=false;let s="";function append(e){if(i&&e!=='"'){s+="\\"}s+=e;i=false}for(let r=0;r0){t.push(s);s=""}continue}append(o)}if(s.length>0){t.push(s.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends o.EventEmitter{constructor(e,t){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(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=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",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},962:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};var s;Object.defineProperty(t,"__esModule",{value:true});const r=n(357);const o=n(747);const u=n(622);s=o.promises,t.chmod=s.chmod,t.copyFile=s.copyFile,t.lstat=s.lstat,t.mkdir=s.mkdir,t.readdir=s.readdir,t.readlink=s.readlink,t.rename=s.rename,t.rmdir=s.rmdir,t.stat=s.stat,t.symlink=s.symlink,t.unlink=s.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return i(this,void 0,void 0,function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}t.exists=exists;function isDirectory(e,n=false){return i(this,void 0,void 0,function*(){const i=n?yield t.stat(e):yield t.lstat(e);return i.isDirectory()})}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function mkdirP(e,n=1e3,s=1){return i(this,void 0,void 0,function*(){r.ok(e,"a path argument must be provided");e=u.resolve(e);if(s>=n)return t.mkdir(e);try{yield t.mkdir(e);return}catch(i){switch(i.code){case"ENOENT":{yield mkdirP(u.dirname(e),n,s+1);yield t.mkdir(e);return}default:{let n;try{n=yield t.stat(e)}catch(e){throw i}if(!n.isDirectory())throw i}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,n){return i(this,void 0,void 0,function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=u.extname(e).toUpperCase();if(n.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(i)){return e}}}const s=e;for(const r of n){e=s+r;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const n=u.dirname(e);const i=u.basename(e).toUpperCase();for(const s of yield t.readdir(n)){if(i===s.toUpperCase()){e=u.join(n,s);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""})}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},436:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__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(e,t,n={}){return i(this,void 0,void 0,function*(){const{force:i,recursive:s}=readCopyOptions(n);const o=(yield u.exists(t))?yield u.stat(t):null;if(o&&o.isFile()&&!i){return}const c=o&&o.isDirectory()?r.join(t,r.basename(e)):t;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const a=yield u.stat(e);if(a.isDirectory()){if(!s){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,c,0,i)}}else{if(r.relative(e,c)===""){throw new Error(`'${c}' and '${e}' are the same file`)}yield copyFile(e,c,i)}})}t.cp=cp;function mv(e,t,n={}){return i(this,void 0,void 0,function*(){if(yield u.exists(t)){let i=true;if(yield u.isDirectory(t)){t=r.join(t,r.basename(e));i=yield u.exists(t)}if(i){if(n.force==null||n.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(r.dirname(t));yield u.rename(e,t)})}t.mv=mv;function rmRF(e){return i(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(e,true)){yield c(`rd /s /q "${e}"`)}else{yield c(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield u.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield u.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield c(`rm -rf "${e}"`)}else{yield u.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return i(this,void 0,void 0,function*(){yield u.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return i(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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: ${e}. 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 t=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(r.delimiter)){if(e){t.push(e)}}}if(u.isRooted(e)){const n=yield u.tryGetExecutablePath(e,t);if(n){return n}return""}if(e.includes("/")||u.IS_WINDOWS&&e.includes("\\")){return""}const n=[];if(process.env.PATH){for(const e of process.env.PATH.split(r.delimiter)){if(e){n.push(e)}}}for(const i of n){const n=yield u.tryGetExecutablePath(i+r.sep+e,t);if(n){return n}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;function readCopyOptions(e){const t=e.force==null?true:e.force;const n=Boolean(e.recursive);return{force:t,recursive:n}}function cpDirRecursive(e,t,n,s){return i(this,void 0,void 0,function*(){if(n>=255)return;n++;yield mkdirP(t);const i=yield u.readdir(e);for(const r of i){const i=`${e}/${r}`;const o=`${t}/${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(t,(yield u.stat(e)).mode)})}function copyFile(e,t,n){return i(this,void 0,void 0,function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(t);yield u.unlink(t)}catch(e){if(e.code==="EPERM"){yield u.chmod(t,"0666");yield u.unlink(t)}}const n=yield u.readlink(e);yield u.symlink(n,t,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(t))||n){yield u.copyFile(e,t)}})}},69:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Outputs=t.Inputs=void 0;var n;(function(e){e["DIGESTFILE"]="digestfile";e["EXTRA_ARGS"]="extra-args";e["IMAGE"]="image";e["PASSWORD"]="password";e["REGISTRY"]="registry";e["TAGS"]="tags";e["TLS_VERIFY"]="tls-verify";e["USERNAME"]="username"})(n=t.Inputs||(t.Inputs={}));var i;(function(e){e["DIGEST"]="digest";e["REGISTRY_PATH"]="registry-path";e["REGISTRY_PATHS"]="registry-paths"})(i=t.Outputs||(t.Outputs={}))},144:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});const i=n(186);const s=n(514);const r=n(436);const o=n(747);const u=n(622);const c=n(629);const a=n(69);let l;let f=false;let d;let p;let h;async function getPodmanPath(){if(l==null){l=await r.which("podman",true);await execute(l,["version"],{group:true})}return l}const g=`docker.io`;const m=g+`/library`;async function run(){const e="latest";const t=i.getInput(a.Inputs.IMAGE,{required:true});const n=i.getInput(a.Inputs.TAGS);p=n.split(" ");h=t.indexOf("/")>-1?g:m;if(p.length===0){i.info(`Input "${a.Inputs.TAGS}" is not provided, using default tag "${e}"`);p.push(e)}const s=i.getInput(a.Inputs.REGISTRY,{required:true});const r=i.getInput(a.Inputs.USERNAME);const u=i.getInput(a.Inputs.PASSWORD);const l=i.getInput(a.Inputs.TLS_VERIFY);const w=i.getInput(a.Inputs.DIGESTFILE);const y=i.getInput(a.Inputs.EXTRA_ARGS);let $=[];if(y){const e=c.splitByNewline(y);$=e.flatMap(e=>e.split(" ")).map(e=>e.trim())}d=`${t}`;const v=[];const _=await checkImageInPodman();const S=_.foundTags;const E=_.missingTags;if(S.length>0){i.info(`Tag${S.length!==1?"s":""} "${S.join(", ")}" `+`of "${d}" found in Podman image storage`)}if(E.length>0&&S.length>0){i.warning(`Tag${E.length!==1?"s":""} "${E.join(", ")}" `+`of "${d}" not found in Podman image storage`)}const b=await pullImageFromDocker();const x=b.foundTags;const C=b.missingTags;if(x.length>0){i.info(`Tag${x.length!==1?"s":""} "${x.join(", ")}" `+`of "${d}" found in Docker image storage`)}if(C.length>0&&x.length>0){i.warning(`Tag${C.length!==1?"s":""} "${C.join(", ")}" `+`of "${d}" not found in Docker image storage`)}if(E.length>0&&C.length>0){throw new Error(`❌ All tags for "${d}" were not found in either Podman image storage, or Docker image storage. `+`Tag${E.length!==1?"s":""} "${E.join(", ")}" `+`not found in Podman image storage, and tag${C.length!==1?"s":""} `+`"${C.join(", ")}" not found in Docker image storage.`)}const O=S.length===p.length;const I=x.length===p.length;if(O&&I){const e=await isPodmanLocalImageLatest();if(!e){i.warning(`The version of "${d}" in the Docker image storage is more recent `+`than the version in the Podman image storage. The image(s) from the Docker image storage `+`will be pushed.`);d=`${h}/${d}`;f=true}else{i.warning(`The version of "${d}" in the Podman image storage is more recent `+`than the version in the Docker image storage. The image(s) from the Podman image `+`storage will be pushed.`)}}else if(I){d=`${h}/${d}`;i.info(`"${d}" was found in the Docker image storage, but not in the Podman `+`image storage. The image(s) will be pulled into Podman image storage, pushed, and then `+`removed from the Podman image storage.`);f=true}else{i.info(`"${d}" was found in the Podman image storage, but not in the Docker `+`image storage. The image(s) will be pushed from Podman image storage.`)}let A=`⏳ Pushing "${d}" with tag${p.length!==1?"s":""} `+`"${p.join(", ")}" to "${s}"`;if(r){A+=` as "${r}"`}i.info(A);let R="";if(r&&!u){i.warning("Username is provided, but password is missing")}else if(!r&&u){i.warning("Password is provided, but username is missing")}else if(r&&u){R=`${r}:${u}`}let T=w;const D=`${d}:${p[0]}`;if(!T){T=`${D.replace(/[/\\/?%*:|"<>]/g,"-")}_digest.txt`}const j=s.replace(/\/$/,"");const k=`${j}/${t}`;i.info(`Combining image name "${t}" and registry "${s}" `+`to form registry path "${k}"`);if(t.indexOf("/")>-1&&s.indexOf("/")>-1){i.warning(`"${k}" does not seem to be a valid registry path. `+`The registry path should not contain more than 2 slashes. `+`Refer to the Inputs section of the readme for naming image and registry.`)}for(const e of p){const t=`${d}:${e}`;const n=`${k}:${e}`;const s=["push","--quiet","--digestfile",T,t,n];if($.length>0){s.push(...$)}if(l){s.push(`--tls-verify=${l}`)}if(R){s.push(`--creds=${R}`)}await execute(await getPodmanPath(),s);i.info(`✅ Successfully pushed "${t}" to "${n}"`);v.push(n);try{const e=(await o.promises.readFile(T)).toString();i.info(e);i.setOutput(a.Outputs.DIGEST,e)}catch(e){i.warning(`Failed to read digest file "${T}": ${e}`)}}i.setOutput(a.Outputs.REGISTRY_PATH,v[0]);i.setOutput(a.Outputs.REGISTRY_PATHS,JSON.stringify(v))}async function pullImageFromDocker(){i.info(`🔍 Checking if "${d}" with tag${p.length!==1?"s":""} `+`"${p.join(", ")}" is present in the local Docker image storage`);let e;const t=[];const n=[];try{for(const i of p){e=`${d}:${i}`;const s=await execute(await getPodmanPath(),["pull",`docker-daemon:${e}`],{ignoreReturnCode:true,failOnStdErr:false,group:true});if(s.exitCode===0){t.push(i)}else{n.push(i)}}}catch(e){i.warning(e)}return{foundTags:t,missingTags:n}}async function checkImageInPodman(){i.info(`🔍 Checking if "${d}" with tag${p.length!==1?"s":""} `+`"${p.join(", ")}" is present in the local Podman image storage`);let e;const t=[];const n=[];try{for(const i of p){e=`${d}:${i}`;const s=await execute(await getPodmanPath(),["image","exists",e],{ignoreReturnCode:true});if(s.exitCode===0){t.push(i)}else{n.push(i)}}}catch(e){i.debug(e)}return{foundTags:t,missingTags:n}}async function isPodmanLocalImageLatest(){const e=`${d}:${p[0]}`;const t=await execute(await getPodmanPath(),["image","inspect",e,"--format","{{.Created}}"]);const n=await execute(await getPodmanPath(),["image","inspect",`${h}/${e}`,"--format","{{.Created}}"]);const i=new Date(t.stdout).getTime();const s=new Date(n.stdout).getTime();return i>s}async function removeDockerImage(){if(d){i.info(`Removing "${d}" from the Podman image storage`);for(const e of p){const t=`${d}:${e}`;await execute(await getPodmanPath(),["rmi",t])}}}async function execute(e,t,n={}){let r="";let o="";const c={...n};c.ignoreReturnCode=true;c.listeners={stdline:e=>{r+=`${e}\n`},errline:e=>{o+=`${e}\n`}};if(n.group){const n=[e,...t].join(" ");i.startGroup(n)}try{const a=await s.exec(e,t,c);if(n.ignoreReturnCode!==true&&a!==0){let t=`${u.basename(e)} exited with code ${a}`;if(o){t+=`\n${o}`}throw new Error(t)}return{exitCode:a,stdout:r,stderr:o}}finally{if(n.group){i.endGroup()}}}run().then(async()=>{if(f){await removeDockerImage()}}).catch(e=>{i.setFailed(e.message)})},629:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.splitByNewline=void 0;function splitByNewline(e){return e.split(/\r?\n/)}t.splitByNewline=splitByNewline},357:e=>{e.exports=require("assert")},129:e=>{e.exports=require("child_process")},614:e=>{e.exports=require("events")},747:e=>{e.exports=require("fs")},87:e=>{e.exports=require("os")},622:e=>{e.exports=require("path")},669:e=>{e.exports=require("util")}};var t={};function __webpack_require__(n){if(t[n]){return t[n].exports}var i=t[n]={exports:{}};var s=true;try{e[n].call(i.exports,i,i.exports,__webpack_require__);s=false}finally{if(s)delete t[n]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(144)})(); +require('./sourcemap-register.js');module.exports=(()=>{var e={351:function(e,t,n){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(n(87));const r=n(278);function issueCommand(e,t,n){const i=new Command(e,t,n);process.stdout.write(i.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const o="::";class Command{constructor(e,t,n){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=n}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const i=this.properties[n];if(i){if(t){t=false}else{e+=","}e+=`${n}=${escapeProperty(i)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return r.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return r.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const r=n(351);const o=n(717);const c=n(278);const u=s(n(87));const a=s(n(622));var l;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(l=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const n=c.toCommandValue(t);process.env[e]=n;const i=process.env["GITHUB_ENV"]||"";if(i){const t="_GitHubActionsFileCommandDelimeter_";const i=`${e}<<${t}${u.EOL}${n}${u.EOL}${t}`;o.issueCommand("ENV",i)}else{r.issueCommand("set-env",{name:e},n)}}t.exportVariable=exportVariable;function setSecret(e){r.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){o.issueCommand("PATH",e)}else{r.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${a.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const n=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!n){throw new Error(`Input required and not supplied: ${e}`)}return n.trim()}t.getInput=getInput;function setOutput(e,t){r.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){r.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=l.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){r.issueCommand("debug",{},e)}t.debug=debug;function error(e){r.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){r.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){r.issue("group",e)}t.startGroup=startGroup;function endGroup(){r.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,function*(){startGroup(e);let n;try{n=yield t()}finally{endGroup()}return n})}t.group=group;function saveState(e,t){r.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},717:function(e,t,n){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(Object.hasOwnProperty.call(e,n))t[n]=e[n];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(n(747));const r=i(n(87));const o=n(278);function issueCommand(e,t){const n=process.env[`GITHUB_${e}`];if(!n){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!s.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}s.appendFileSync(n,`${o.toCommandValue(t)}${r.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},514:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))i(t,e,n);s(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const c=n(304);const u=r(n(159));function exec(e,t,n){return o(this,void 0,void 0,function*(){const i=u.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const s=i[0];t=i.slice(1).concat(t||[]);const r=new u.ToolRunner(s,t,n);return r.exec()})}t.exec=exec;function getExecOutput(e,t,n){var i,s;return o(this,void 0,void 0,function*(){let r="";let o="";const u=new c.StringDecoder("utf8");const a=new c.StringDecoder("utf8");const l=(i=n===null||n===void 0?void 0:n.listeners)===null||i===void 0?void 0:i.stdout;const f=(s=n===null||n===void 0?void 0:n.listeners)===null||s===void 0?void 0:s.stderr;const d=e=>{o+=a.write(e);if(f){f(e)}};const h=e=>{r+=u.write(e);if(l){l(e)}};const p=Object.assign(Object.assign({},n===null||n===void 0?void 0:n.listeners),{stdout:h,stderr:d});const g=yield exec(e,t,Object.assign(Object.assign({},n),{listeners:p}));r+=u.end();o+=a.end();return{exitCode:g,stdout:r,stderr:o}})}t.getExecOutput=getExecOutput},159:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){if(i===undefined)i=n;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[n]}})}:function(e,t,n,i){if(i===undefined)i=n;e[i]=t[n]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.hasOwnProperty.call(e,n))i(t,e,n);s(t,e);return t};var o=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const c=r(n(87));const u=r(n(614));const a=r(n(129));const l=r(n(622));const f=r(n(436));const d=r(n(962));const h=n(213);const p=process.platform==="win32";class ToolRunner extends u.EventEmitter{constructor(e,t,n){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=n||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const n=this._getSpawnFileName();const i=this._getSpawnArgs(e);let s=t?"":"[command]";if(p){if(this._isCmdFile()){s+=n;for(const e of i){s+=` ${e}`}}else if(e.windowsVerbatimArguments){s+=`"${n}"`;for(const e of i){s+=` ${e}`}}else{s+=this._windowsQuoteCmdArg(n);for(const e of i){s+=` ${this._windowsQuoteCmdArg(e)}`}}}else{s+=n;for(const e of i){s+=` ${e}`}}return s}_processLineBuffer(e,t,n){try{let i=t+e.toString();let s=i.indexOf(c.EOL);while(s>-1){const e=i.substring(0,s);n(e);i=i.substring(s+c.EOL.length);s=i.indexOf(c.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(p){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(p){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const n of this.args){t+=" ";t+=e.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let n=false;for(const i of e){if(t.some(e=>e===i)){n=true;break}}if(!n){return e}let i='"';let s=true;for(let t=e.length;t>0;t--){i+=e[t-1];if(s&&e[t-1]==="\\"){i+="\\"}else if(e[t-1]==='"'){s=true;i+='"'}else{s=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let n=true;for(let i=e.length;i>0;i--){t+=e[i-1];if(n&&e[i-1]==="\\"){t+="\\"}else if(e[i-1]==='"'){n=true;t+="\\"}else{n=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const n={};n.cwd=e.cwd;n.env=e.env;n["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){n.argv0=`"${t}"`}return n}exec(){return o(this,void 0,void 0,function*(){if(!d.isRooted(this.toolPath)&&(this.toolPath.includes("/")||p&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.which(this.toolPath,true);return new Promise((e,t)=>o(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const n=this._cloneExecOptions(this.options);if(!n.silent&&n.outStream){n.outStream.write(this._getCommandString(n)+c.EOL)}const i=new ExecState(n,this.toolPath);i.on("debug",e=>{this._debug(e)});if(this.options.cwd&&!(yield d.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const s=this._getSpawnFileName();const r=a.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s));let o="";if(r.stdout){r.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!n.silent&&n.outStream){n.outStream.write(e)}o=this._processLineBuffer(e,o,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}let u="";if(r.stderr){r.stderr.on("data",e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!n.silent&&n.errStream&&n.outStream){const t=n.failOnStdErr?n.errStream:n.outStream;t.write(e)}u=this._processLineBuffer(e,u,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}r.on("error",e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()});r.on("exit",e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()});r.on("close",e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()});i.on("done",(n,i)=>{if(o.length>0){this.emit("stdline",o)}if(u.length>0){this.emit("errline",u)}r.removeAllListeners();if(n){t(n)}else{e(i)}});if(this.options.input){if(!r.stdin){throw new Error("child process missing stdin")}r.stdin.end(this.options.input)}}))})}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let n=false;let i=false;let s="";function append(e){if(i&&e!=='"'){s+="\\"}s+=e;i=false}for(let r=0;r0){t.push(s);s=""}continue}append(o)}if(s.length>0){t.push(s.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends u.EventEmitter{constructor(e,t){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(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=h.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=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",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},962:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};var s;Object.defineProperty(t,"__esModule",{value:true});const r=n(357);const o=n(747);const c=n(622);s=o.promises,t.chmod=s.chmod,t.copyFile=s.copyFile,t.lstat=s.lstat,t.mkdir=s.mkdir,t.readdir=s.readdir,t.readlink=s.readlink,t.rename=s.rename,t.rmdir=s.rmdir,t.stat=s.stat,t.symlink=s.symlink,t.unlink=s.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return i(this,void 0,void 0,function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}t.exists=exists;function isDirectory(e,n=false){return i(this,void 0,void 0,function*(){const i=n?yield t.stat(e):yield t.lstat(e);return i.isDirectory()})}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function mkdirP(e,n=1e3,s=1){return i(this,void 0,void 0,function*(){r.ok(e,"a path argument must be provided");e=c.resolve(e);if(s>=n)return t.mkdir(e);try{yield t.mkdir(e);return}catch(i){switch(i.code){case"ENOENT":{yield mkdirP(c.dirname(e),n,s+1);yield t.mkdir(e);return}default:{let n;try{n=yield t.stat(e)}catch(e){throw i}if(!n.isDirectory())throw i}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,n){return i(this,void 0,void 0,function*(){let i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){const t=c.extname(e).toUpperCase();if(n.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(i)){return e}}}const s=e;for(const r of n){e=s+r;i=undefined;try{i=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(i&&i.isFile()){if(t.IS_WINDOWS){try{const n=c.dirname(e);const i=c.basename(e).toUpperCase();for(const s of yield t.readdir(n)){if(i===s.toUpperCase()){e=c.join(n,s);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""})}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},436:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function adopt(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,s){function fulfilled(e){try{step(i.next(e))}catch(e){s(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){s(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const s=n(129);const r=n(622);const o=n(669);const c=n(962);const u=o.promisify(s.exec);function cp(e,t,n={}){return i(this,void 0,void 0,function*(){const{force:i,recursive:s}=readCopyOptions(n);const o=(yield c.exists(t))?yield c.stat(t):null;if(o&&o.isFile()&&!i){return}const u=o&&o.isDirectory()?r.join(t,r.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const a=yield c.stat(e);if(a.isDirectory()){if(!s){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,u,0,i)}}else{if(r.relative(e,u)===""){throw new Error(`'${u}' and '${e}' are the same file`)}yield copyFile(e,u,i)}})}t.cp=cp;function mv(e,t,n={}){return i(this,void 0,void 0,function*(){if(yield c.exists(t)){let i=true;if(yield c.isDirectory(t)){t=r.join(t,r.basename(e));i=yield c.exists(t)}if(i){if(n.force==null||n.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(r.dirname(t));yield c.rename(e,t)})}t.mv=mv;function rmRF(e){return i(this,void 0,void 0,function*(){if(c.IS_WINDOWS){try{if(yield c.isDirectory(e,true)){yield u(`rd /s /q "${e}"`)}else{yield u(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield c.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield c.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm -rf "${e}"`)}else{yield c.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return i(this,void 0,void 0,function*(){yield c.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return i(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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: ${e}. 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 t=[];if(c.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(r.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const n=yield c.tryGetExecutablePath(e,t);if(n){return n}return""}if(e.includes("/")||c.IS_WINDOWS&&e.includes("\\")){return""}const n=[];if(process.env.PATH){for(const e of process.env.PATH.split(r.delimiter)){if(e){n.push(e)}}}for(const i of n){const n=yield c.tryGetExecutablePath(i+r.sep+e,t);if(n){return n}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;function readCopyOptions(e){const t=e.force==null?true:e.force;const n=Boolean(e.recursive);return{force:t,recursive:n}}function cpDirRecursive(e,t,n,s){return i(this,void 0,void 0,function*(){if(n>=255)return;n++;yield mkdirP(t);const i=yield c.readdir(e);for(const r of i){const i=`${e}/${r}`;const o=`${t}/${r}`;const u=yield c.lstat(i);if(u.isDirectory()){yield cpDirRecursive(i,o,n,s)}else{yield copyFile(i,o,s)}}yield c.chmod(t,(yield c.stat(e)).mode)})}function copyFile(e,t,n){return i(this,void 0,void 0,function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const n=yield c.readlink(e);yield c.symlink(n,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||n){yield c.copyFile(e,t)}})}},885:e=>{const{hasOwnProperty:t}=Object.prototype;const n=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";const i=(e,t)=>{const r=[];let o="";if(typeof t==="string"){t={section:t,whitespace:false}}else{t=t||Object.create(null);t.whitespace=t.whitespace===true}const u=t.whitespace?" = ":"=";for(const t of Object.keys(e)){const i=e[t];if(i&&Array.isArray(i)){for(const e of i)o+=c(t+"[]")+u+c(e)+"\n"}else if(i&&typeof i==="object")r.push(t);else o+=c(t)+u+c(i)+n}if(t.section&&o.length)o="["+c(t.section)+"]"+n+o;for(const c of r){const r=s(c).join("\\.");const u=(t.section?t.section+".":"")+r;const{whitespace:a}=t;const l=i(e[c],{section:u,whitespace:a});if(o.length&&l.length)o+=n;o+=l}return o};const s=e=>e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(e=>e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,""));const r=e=>{const n=Object.create(null);let i=n;let r=null;const o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;const c=e.split(/[\r\n]+/g);for(const e of c){if(!e||e.match(/^\s*[;#]/))continue;const s=e.match(o);if(!s)continue;if(s[1]!==undefined){r=u(s[1]);if(r==="__proto__"){i=Object.create(null);continue}i=n[r]=n[r]||Object.create(null);continue}const c=u(s[2]);const a=c.length>2&&c.slice(-2)==="[]";const l=a?c.slice(0,-2):c;if(l==="__proto__")continue;const f=s[3]?u(s[4]):true;const d=f==="true"||f==="false"||f==="null"?JSON.parse(f):f;if(a){if(!t.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 e of Object.keys(n)){if(!t.call(n,e)||typeof n[e]!=="object"||Array.isArray(n[e]))continue;const i=s(e);let r=n;const o=i.pop();const c=o.replace(/\\\./g,".");for(const e of i){if(e==="__proto__")continue;if(!t.call(r,e)||typeof r[e]!=="object")r[e]=Object.create(null);r=r[e]}if(r===n&&c===o)continue;r[c]=n[e];a.push(e)}for(const e of a)delete n[e];return n};const o=e=>e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'";const c=e=>typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&o(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#");const u=(e,t)=>{e=(e||"").trim();if(o(e)){if(e.charAt(0)==="'")e=e.substr(1,e.length-2);try{e=JSON.parse(e)}catch(e){}}else{let t=false;let n="";for(let i=0,s=e.length;i{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Outputs=t.Inputs=void 0;var n;(function(e){e["DIGESTFILE"]="digestfile";e["EXTRA_ARGS"]="extra-args";e["IMAGE"]="image";e["PASSWORD"]="password";e["REGISTRY"]="registry";e["TAGS"]="tags";e["TLS_VERIFY"]="tls-verify";e["USERNAME"]="username"})(n=t.Inputs||(t.Inputs={}));var i;(function(e){e["DIGEST"]="digest";e["REGISTRY_PATH"]="registry-path";e["REGISTRY_PATHS"]="registry-paths"})(i=t.Outputs||(t.Outputs={}))},144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const i=n(186);const s=n(514);const r=n(436);const o=n(747);const c=n(87);const u=n(622);const a=n(629);const l=n(69);let f;let d=false;let h;let p;let g;let m;async function getPodmanPath(){if(f==null){f=await r.which("podman",true);await execute(f,["version"],{group:true})}return f}async function run(){const e="latest";const t=i.getInput(l.Inputs.IMAGE);const n=i.getInput(l.Inputs.TAGS);const s=n.trim().split(/\s+/);if(s.length===0){i.info(`Input "${l.Inputs.TAGS}" is not provided, using default tag "${e}"`);s.push(e)}const r=i.getInput(l.Inputs.REGISTRY);const c=i.getInput(l.Inputs.USERNAME);const u=i.getInput(l.Inputs.PASSWORD);const f=i.getInput(l.Inputs.TLS_VERIFY);const g=i.getInput(l.Inputs.DIGESTFILE);const w=a.isFullImageName(s[0]);if(s.some(e=>a.isFullImageName(e)!==w)){throw new Error(`Input "${l.Inputs.TAGS}" cannot have a mix of full name and non full name tags`)}if(!w){if(!t){throw new Error(`Input "${l.Inputs.IMAGE}" must be provided when using non full name tags`)}if(!r){throw new Error(`Input "${l.Inputs.REGISTRY}" must be provided when using non full name tags`)}const e=r.replace(/\/$/,"");const n=`${e}/${t}`;i.info(`Combining image name "${t}" and registry "${r}" `+`to form registry path "${n}"`);if(t.indexOf("/")>-1&&r.indexOf("/")>-1){i.warning(`"${n}" does not seem to be a valid registry path. `+`The registry path should not contain more than 2 slashes. `+`Refer to the Inputs section of the readme for naming image and registry.`)}h=s.map(e=>a.getFullImageName(t,e));p=s.map(e=>a.getFullImageName(n,e))}else{if(t){i.warning(`Input "${l.Inputs.IMAGE}" is ignored when using full name tags`)}if(r){i.warning(`Input "${l.Inputs.REGISTRY}" is ignored when using full name tags`)}h=s;p=s}const y=i.getInput(l.Inputs.EXTRA_ARGS);let v=[];if(y){const e=a.splitByNewline(y);v=e.flatMap(e=>e.split(" ")).map(e=>e.trim())}const _=[];const b=await checkImageInPodman();const S=b.foundTags;const E=b.missingTags;if(S.length>0){i.info(`Tag${S.length!==1?"s":""} "${S.join(", ")}" `+`found in Podman image storage`)}if(E.length>0&&S.length>0){i.warning(`Tag${E.length!==1?"s":""} "${E.join(", ")}" `+`not found in Podman image storage`)}const $=await pullImageFromDocker();const x=$.foundTags;const O=$.missingTags;if(x.length>0){i.info(`Tag${x.length!==1?"s":""} "${x.join(", ")}" `+`found in Docker image storage`)}if(O.length>0&&x.length>0){i.warning(`Tag${O.length!==1?"s":""} "${O.join(", ")}" `+`not found in Docker image storage`)}if(E.length>0&&O.length>0){throw new Error(`❌ All tags were not found in either Podman image storage, or Docker image storage. `+`Tag${E.length!==1?"s":""} "${E.join(", ")}" `+`not found in Podman image storage, and tag${O.length!==1?"s":""} `+`"${O.join(", ")}" not found in Docker image storage.`)}const C=S.length===s.length;const T=x.length===s.length;if(C&&T){const e=await isPodmanLocalImageLatest();if(!e){i.warning(`The version of "${h[0]}" in the Docker image storage is more recent `+`than the version in the Podman image storage. The image(s) from the Docker image storage `+`will be pushed.`);d=true}else{i.warning(`The version of "${h[0]}" in the Podman image storage is more recent `+`than the version in the Docker image storage. The image(s) from the Podman image `+`storage will be pushed.`)}}else if(T){i.info(`Tag "${h[0]}" was found in the Docker image storage, but not in the Podman `+`image storage. The image(s) will be pulled into Podman image storage, pushed, and then `+`removed from the Podman image storage.`);d=true}else{i.info(`Tag "${h[0]}" was found in the Podman image storage, but not in the Docker `+`image storage. The image(s) will be pushed from Podman image storage.`)}let I=`⏳ Pushing "${h[0]}" to ${p.join(", ")}`;if(c){I+=` as "${c}"`}i.info(I);let A="";if(c&&!u){i.warning("Username is provided, but password is missing")}else if(!c&&u){i.warning("Password is provided, but username is missing")}else if(c&&u){A=`${c}:${u}`}let D=g;if(!D){D=`${h[0].replace(/[/\\/?%*:|"<>]/g,"-")}_digest.txt`}for(const e of p){const t=[...d?m:[],"push","--quiet","--digestfile",D,d?a.getFullDockerImageName(h[0]):h[0],e];if(v.length>0){t.push(...v)}if(f){t.push(`--tls-verify=${f}`)}if(A){t.push(`--creds=${A}`)}await execute(await getPodmanPath(),t);i.info(`✅ Successfully pushed "${h[0]}" to "${e}"`);_.push(e);try{const e=(await o.promises.readFile(D)).toString();i.info(e);i.setOutput(l.Outputs.DIGEST,e)}catch(e){i.warning(`Failed to read digest file "${D}": ${e}`)}}i.setOutput(l.Outputs.REGISTRY_PATH,_[0]);i.setOutput(l.Outputs.REGISTRY_PATHS,JSON.stringify(_))}async function pullImageFromDocker(){i.info(`🔍 Checking if "${h.join(", ")}" present in the local Docker image storage`);const e=[];const t=[];try{for(const n of h){const i=await execute(await getPodmanPath(),[...m,"pull",`docker-daemon:${n}`],{ignoreReturnCode:true,failOnStdErr:false,group:true});if(i.exitCode===0){e.push(n)}else{t.push(n)}}}catch(e){i.warning(e)}return{foundTags:e,missingTags:t}}async function checkImageInPodman(){i.info(`🔍 Checking if "${h.join(", ")}" present in the local Podman image storage`);const e=[];const t=[];try{for(const n of h){const i=await execute(await getPodmanPath(),["image","exists",n],{ignoreReturnCode:true});if(i.exitCode===0){e.push(n)}else{t.push(n)}}}catch(e){i.debug(e)}return{foundTags:e,missingTags:t}}async function isPodmanLocalImageLatest(){const e=h[0];const t=await execute(await getPodmanPath(),["image","inspect",e,"--format","{{.Created}}"]);const n=await execute(await getPodmanPath(),[...m,"image","inspect",a.getFullDockerImageName(e),"--format","{{.Created}}"]);const i=new Date(t.stdout).getTime();const s=new Date(n.stdout).getTime();return i>s}async function createDockerPodmanImageStroage(){i.info(`Creating temporary Podman image storage for pulling from Docker daemon`);g=await o.promises.mkdtemp(u.join(c.tmpdir(),"podman-from-docker-"));m=["--root",g];if(await a.isStorageDriverOverlay()){const e=await a.findFuseOverlayfsPath();if(e){i.info(`Overriding storage mount_program with "fuse-overlayfs" in environment`);m.push("--storage-opt");m.push(`overlay.mount_program=${e}`)}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")}}async function removeDockerPodmanImageStroage(){if(g){try{i.info(`Removing temporary Podman image storage for pulling from Docker daemon`);await execute(await getPodmanPath(),[...m,"rmi","-a","-f"]);await o.promises.rmdir(g,{recursive:true})}catch(e){i.warning(`Failed to remove podman image stroage ${g}: ${e}`)}}}async function execute(e,t,n={}){let r="";let o="";const c={...n};c.ignoreReturnCode=true;c.listeners={stdline:e=>{r+=`${e}\n`},errline:e=>{o+=`${e}\n`}};if(n.group){const n=[e,...t].join(" ");i.startGroup(n)}try{const a=await s.exec(e,t,c);if(n.ignoreReturnCode!==true&&a!==0){let t=`${u.basename(e)} exited with code ${a}`;if(o){t+=`\n${o}`}throw new Error(t)}return{exitCode:a,stdout:r,stderr:o}}finally{if(n.group){i.endGroup()}}}async function main(){try{await createDockerPodmanImageStroage();await run()}finally{await removeDockerPodmanImageStroage()}}main().catch(e=>{i.setFailed(e.message)})},629:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getFullDockerImageName=t.getFullImageName=t.isFullImageName=t.splitByNewline=t.findFuseOverlayfsPath=t.isStorageDriverOverlay=void 0;const i=n(885);const s=n(747);const r=n(186);const o=n(622);const c=n(436);const u=n(87);async function findStorageDriver(e){let t="";for(const n of e){r.debug(`Checking if the storage file exists at ${n}`);if(await fileExists(n)){r.debug(`Storage file exists at ${n}`);const e=i.parse(await s.promises.readFile(n,"utf-8"));if(e.storage.driver){t=e.storage.driver}}}return t}async function isStorageDriverOverlay(){let e=o.join(u.homedir(),".config");if(process.env.XDG_CONFIG_HOME){e=process.env.XDG_CONFIG_HOME}const t=["/etc/containers/storage.conf",o.join(e,"containers/storage.conf")];const n=await findStorageDriver(t);return n==="overlay"}t.isStorageDriverOverlay=isStorageDriverOverlay;async function fileExists(e){try{await s.promises.access(e);return true}catch(e){return false}}async function findFuseOverlayfsPath(){let e;try{e=await c.which("fuse-overlayfs")}catch(e){r.debug(e)}return e}t.findFuseOverlayfsPath=findFuseOverlayfsPath;function splitByNewline(e){return e.split(/\r?\n/)}t.splitByNewline=splitByNewline;function isFullImageName(e){return e.indexOf(":")>0}t.isFullImageName=isFullImageName;function getFullImageName(e,t){if(isFullImageName(t)){return t}return`${e}:${t}`}t.getFullImageName=getFullImageName;const a=`docker.io`;const l=a+`/library`;function getFullDockerImageName(e){switch(e.split("/").length){case 1:return`${l}/${e}`;case 2:return`${a}/${e}`;default:return e}}t.getFullDockerImageName=getFullDockerImageName},357:e=>{"use strict";e.exports=require("assert")},129:e=>{"use strict";e.exports=require("child_process")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},304:e=>{"use strict";e.exports=require("string_decoder")},213:e=>{"use strict";e.exports=require("timers")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __webpack_require__(n){if(t[n]){return t[n].exports}var i=t[n]={exports:{}};var s=true;try{e[n].call(i.exports,i,i.exports,__webpack_require__);s=false}finally{if(s)delete t[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 52f3842..83e59f1 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack:/push-to-registry/node_modules/@actions/core/lib/command.js","../webpack:/push-to-registry/node_modules/@actions/core/lib/core.js","../webpack:/push-to-registry/node_modules/@actions/core/lib/file-command.js","../webpack:/push-to-registry/node_modules/@actions/core/lib/utils.js","../webpack:/push-to-registry/node_modules/@actions/exec/lib/exec.js","../webpack:/push-to-registry/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/push-to-registry/node_modules/@actions/io/lib/io-util.js","../webpack:/push-to-registry/node_modules/@actions/io/lib/io.js","../webpack:/push-to-registry/src/generated/inputs-outputs.ts","../webpack:/push-to-registry/src/index.ts","../webpack:/push-to-registry/src/util.ts","../webpack:/push-to-registry/external \"assert\"","../webpack:/push-to-registry/external \"child_process\"","../webpack:/push-to-registry/external \"events\"","../webpack:/push-to-registry/external \"fs\"","../webpack:/push-to-registry/external \"os\"","../webpack:/push-to-registry/external \"path\"","../webpack:/push-to-registry/external \"util\"","../webpack:/push-to-registry/webpack/bootstrap","../webpack:/push-to-registry/webpack/runtime/compat","../webpack:/push-to-registry/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","Inputs","Outputs","core","inputs_outputs_1","podmanPath","isImageFromDocker","imageToPush","tagsList","dockerBaseUrl","async","getPodmanPath","execute","DOCKER_IO","DOCKER_IO_NAMESPACED","run","DEFAULT_TAG","imageInput","IMAGE","tags","TAGS","registry","REGISTRY","username","USERNAME","password","PASSWORD","tlsVerify","TLS_VERIFY","digestFileInput","DIGESTFILE","inputExtraArgsStr","EXTRA_ARGS","podmanExtraArgs","lines","splitByNewline","flatMap","map","registryPathList","podmanImageStorageCheckResult","checkImageInPodman","podmanFoundTags","foundTags","podmanMissingTags","missingTags","dockerImageStorageCheckResult","pullImageFromDocker","dockerFoundTags","dockerMissingTags","allTagsinPodman","allTagsinDocker","isPodmanImageLatest","isPodmanLocalImageLatest","pushMsg","creds","digestFile","imageNameWithTag","registryWithoutTrailingSlash","registryPath","tag","imageWithTag","registryPathWithTag","digest","readFile","DIGEST","REGISTRY_PATH","REGISTRY_PATHS","commandResult","podmanLocalImageTimeStamp","pulledImageCreationTimeStamp","podmanImageTime","Date","getTime","dockerImageTime","removeDockerImage","executable","execOptions","finalExecOptions","groupName","catch","module","require","__webpack_module_cache__","moduleId","threw","__webpack_modules__","ab","__dirname"],"mappings":"6DACA,IAAAA,EAAAC,MAAAA,KAAAD,cAAA,SAAAE,GACA,GAAAA,GAAAA,EAAAC,WAAA,OAAAD,EACA,IAAAE,EAAA,GACA,GAAAF,GAAA,KAAA,IAAA,IAAAG,KAAAH,EAAA,GAAAI,OAAAC,eAAAC,KAAAN,EAAAG,GAAAD,EAAAC,GAAAH,EAAAG,GACAD,EAAA,WAAAF,EACA,OAAAE,GAEAE,OAAAG,eAAAC,EAAA,aAAA,CAAAC,MAAA,OACA,MAAAC,EAAAZ,EAAAa,EAAA,KACA,MAAAC,EAAAD,EAAA,KAWA,SAAAE,aAAAC,EAAAC,EAAAC,GACA,MAAAC,EAAA,IAAAC,QAAAJ,EAAAC,EAAAC,GACAG,QAAAC,OAAAC,MAAAJ,EAAAK,WAAAZ,EAAAa,KAEAf,EAAAK,aAAAA,aACA,SAAAW,MAAAC,EAAAT,EAAA,IACAH,aAAAY,EAAA,GAAAT,GAEAR,EAAAgB,MAAAA,MACA,MAAAE,EAAA,KACA,MAAAR,QACAS,YAAAb,EAAAC,EAAAC,GACA,IAAAF,EAAA,CACAA,EAAA,kBAEAf,KAAAe,QAAAA,EACAf,KAAAgB,WAAAA,EACAhB,KAAAiB,QAAAA,EAEAW,WACA,IAAAC,EAAAF,EAAA3B,KAAAe,QACA,GAAAf,KAAAgB,YAAAX,OAAAyB,KAAA9B,KAAAgB,YAAAe,OAAA,EAAA,CACAF,GAAA,IACA,IAAAG,EAAA,KACA,IAAA,MAAAC,KAAAjC,KAAAgB,WAAA,CACA,GAAAhB,KAAAgB,WAAAV,eAAA2B,GAAA,CACA,MAAAC,EAAAlC,KAAAgB,WAAAiB,GACA,GAAAC,EAAA,CACA,GAAAF,EAAA,CACAA,EAAA,UAEA,CACAH,GAAA,IAEAA,MAAAI,KAAAE,eAAAD,QAKAL,MAAAF,IAAAS,WAA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MAAA,CACAF,SAAAA,EACA5D,OAAAA,EACAgJ,OAAAA,GAIA,QACA,GAAAsM,EAAAjR,MAAA,CACAwM,EAAAzM,aAKAqN,MACAvP,KAAAkP,UACA,GAAAJ,EAAA,OACAoE,uBAGAK,MAAArO,IACAyJ,EAAAlN,UAAAyD,EAAAxH,mGCpZA,SAAAiT,eAAA7R,GACA,OAAAA,EAAAsH,MAAA,SADAlJ,EAAAyT,eAAAA,wBCLA6C,EAAAtW,QAAAuW,QAAA,mBCAAD,EAAAtW,QAAAuW,QAAA,0BCAAD,EAAAtW,QAAAuW,QAAA,mBCAAD,EAAAtW,QAAAuW,QAAA,cCAAD,EAAAtW,QAAAuW,QAAA,eCAAD,EAAAtW,QAAAuW,QAAA,iBCAAD,EAAAtW,QAAAuW,QAAA,UCCA,IAAAC,EAAA,GAGA,SAAArW,oBAAAsW,GAEA,GAAAD,EAAAC,GAAA,CACA,OAAAD,EAAAC,GAAAzW,QAGA,IAAAsW,EAAAE,EAAAC,GAAA,CAGAzW,QAAA,IAIA,IAAA0W,EAAA,KACA,IACAC,EAAAF,GAAA3W,KAAAwW,EAAAtW,QAAAsW,EAAAA,EAAAtW,QAAAG,qBACAuW,EAAA,MACA,QACA,GAAAA,SAAAF,EAAAC,GAIA,OAAAH,EAAAtW,QCzBAG,oBAAAyW,GAAAC,UAAA,ICEA,OAAA1W,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","// This file was auto-generated by action-io-generator. Do not edit by hand!\nexport enum Inputs {\n /**\n * After copying the image, write the digest of the resulting image to the file.\n * By default, the filename will be determined from the image and tag.\n * The contents of this file are the digest output.\n * Required: false\n * Default: None.\n */\n DIGESTFILE = \"digestfile\",\n /**\n * Extra args to be passed to podman push.\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 * Name of the image to push (e.g. username/imagename or imagename)\n * Required: true\n * Default: None.\n */\n IMAGE = \"image\",\n /**\n * Password to use as credential to authenticate to the registry\n * Required: false\n * Default: None.\n */\n PASSWORD = \"password\",\n /**\n * Hostname and optional namespace to push the image to (eg. quay.io/username or quay.io)\n * Required: true\n * Default: None.\n */\n REGISTRY = \"registry\",\n /**\n * The tag or tags of the image to push. For multiple tags, seperate by a space. For example, \"latest v1\"\n * Required: false\n * Default: \"latest\"\n */\n TAGS = \"tags\",\n /**\n * Verify TLS certificates when contacting the registry\n * Required: false\n * Default: \"true\"\n */\n TLS_VERIFY = \"tls-verify\",\n /**\n * Username to use as credential to authenticate to the registry\n * Required: false\n * Default: None.\n */\n USERNAME = \"username\",\n}\n\nexport enum Outputs {\n /**\n * The pushed image digest, as written to the \"digestfile\"\n * Required: false\n * Default: None.\n */\n DIGEST = \"digest\",\n /**\n * The first element of registry-paths.\n * Required: false\n * Default: None.\n */\n REGISTRY_PATH = \"registry-path\",\n /**\n * A JSON array of registry paths to which the tag(s) were pushed\n * Required: false\n * Default: None.\n */\n REGISTRY_PATHS = \"registry-paths\",\n}\n","import * as core from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport * as io from \"@actions/io\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { splitByNewline } from \"./util\";\nimport { Inputs, Outputs } from \"./generated/inputs-outputs\";\n\ninterface ExecResult {\n exitCode: number;\n stdout: string;\n stderr: string;\n}\n\ninterface ImageStorageCheckResult {\n readonly foundTags: string[];\n readonly missingTags: string[];\n}\n\nlet podmanPath: string | undefined;\n\n// boolean value to check if pushed image is from Docker image storage\nlet isImageFromDocker = false;\nlet imageToPush: string;\nlet tagsList: string[];\nlet dockerBaseUrl: string;\n\nasync function getPodmanPath(): Promise {\n if (podmanPath == null) {\n podmanPath = await io.which(\"podman\", true);\n await execute(podmanPath, [ \"version\" ], { group: true });\n }\n\n return podmanPath;\n}\n\n// base URL that gets appended if image is pulled from the Docker imaege storage\nconst DOCKER_IO = `docker.io`;\nconst DOCKER_IO_NAMESPACED = DOCKER_IO + `/library`;\n\nasync function run(): Promise {\n const DEFAULT_TAG = \"latest\";\n const imageInput = core.getInput(Inputs.IMAGE, { required: true });\n const tags = core.getInput(Inputs.TAGS);\n // split tags\n tagsList = tags.split(\" \");\n\n // handle the case when image name is 'namespace/imagename' and image is present in docker storage\n dockerBaseUrl = imageInput.indexOf(\"/\") > -1 ? DOCKER_IO : DOCKER_IO_NAMESPACED;\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 const registry = core.getInput(Inputs.REGISTRY, { required: true });\n const username = core.getInput(Inputs.USERNAME);\n const password = core.getInput(Inputs.PASSWORD);\n const tlsVerify = core.getInput(Inputs.TLS_VERIFY);\n const digestFileInput = core.getInput(Inputs.DIGESTFILE);\n\n const inputExtraArgsStr = core.getInput(Inputs.EXTRA_ARGS);\n let podmanExtraArgs: 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 podmanExtraArgs = lines.flatMap((line) => line.split(\" \")).map((arg) => arg.trim());\n }\n\n imageToPush = `${imageInput}`;\n const registryPathList: string[] = [];\n\n // check if image with all the required tags exist in Podman image storage\n const podmanImageStorageCheckResult: ImageStorageCheckResult = await checkImageInPodman();\n\n const podmanFoundTags: string[] = podmanImageStorageCheckResult.foundTags;\n const podmanMissingTags: string[] = podmanImageStorageCheckResult.missingTags;\n\n if (podmanFoundTags.length > 0) {\n core.info(`Tag${podmanFoundTags.length !== 1 ? \"s\" : \"\"} \"${podmanFoundTags.join(\", \")}\" `\n + `of \"${imageToPush}\" found in Podman image storage`);\n }\n\n // Log warning if few tags are not found\n if (podmanMissingTags.length > 0 && podmanFoundTags.length > 0) {\n core.warning(`Tag${podmanMissingTags.length !== 1 ? \"s\" : \"\"} \"${podmanMissingTags.join(\", \")}\" `\n + `of \"${imageToPush}\" not found in Podman image storage`);\n }\n\n // check if image with all the required tags exist in Docker image storage\n // and if exist pull the image with all the tags to Podman\n const dockerImageStorageCheckResult: ImageStorageCheckResult = await pullImageFromDocker();\n\n const dockerFoundTags: string[] = dockerImageStorageCheckResult.foundTags;\n const dockerMissingTags: string[] = dockerImageStorageCheckResult.missingTags;\n\n if (dockerFoundTags.length > 0) {\n core.info(`Tag${dockerFoundTags.length !== 1 ? \"s\" : \"\"} \"${dockerFoundTags.join(\", \")}\" `\n + `of \"${imageToPush}\" found in Docker image storage`);\n }\n\n // Log warning if few tags are not found\n if (dockerMissingTags.length > 0 && dockerFoundTags.length > 0) {\n core.warning(`Tag${dockerMissingTags.length !== 1 ? \"s\" : \"\"} \"${dockerMissingTags.join(\", \")}\" `\n + `of \"${imageToPush}\" not found in Docker image storage`);\n }\n\n // failing if image with any of the tag is not found in Docker as well as Podman\n if (podmanMissingTags.length > 0 && dockerMissingTags.length > 0) {\n throw new Error(\n `❌ All tags for \"${imageToPush}\" were not found in either Podman image storage, or Docker image storage. `\n + `Tag${podmanMissingTags.length !== 1 ? \"s\" : \"\"} \"${podmanMissingTags.join(\", \")}\" `\n + `not found in Podman image storage, and tag${dockerMissingTags.length !== 1 ? \"s\" : \"\"} `\n + `\"${dockerMissingTags.join(\", \")}\" not found in Docker image storage.`\n );\n }\n\n const allTagsinPodman: boolean = podmanFoundTags.length === tagsList.length;\n const allTagsinDocker: boolean = dockerFoundTags.length === tagsList.length;\n\n if (allTagsinPodman && allTagsinDocker) {\n const isPodmanImageLatest = await isPodmanLocalImageLatest();\n if (!isPodmanImageLatest) {\n core.warning(\n `The version of \"${imageToPush}\" in the Docker image storage is more recent `\n + `than the version in the Podman image storage. The image(s) from the Docker image storage `\n + `will be pushed.`\n );\n imageToPush = `${dockerBaseUrl}/${imageToPush}`;\n isImageFromDocker = true;\n }\n else {\n core.warning(\n `The version of \"${imageToPush}\" in the Podman image storage is more recent `\n + `than the version in the Docker image storage. The image(s) from the Podman image `\n + `storage will be pushed.`\n );\n }\n }\n else if (allTagsinDocker) {\n imageToPush = `${dockerBaseUrl}/${imageToPush}`;\n core.info(\n `\"${imageToPush}\" was found in the Docker image storage, but not in the Podman `\n + `image storage. The image(s) will be pulled into Podman image storage, pushed, and then `\n + `removed from the Podman image storage.`\n );\n isImageFromDocker = true;\n }\n else {\n core.info(\n `\"${imageToPush}\" was found in the Podman image storage, but not in the Docker `\n + `image storage. The image(s) will be pushed from Podman image storage.`\n );\n }\n\n let pushMsg = `⏳ Pushing \"${imageToPush}\" with tag${tagsList.length !== 1 ? \"s\" : \"\"} `\n + `\"${tagsList.join(\", \")}\" to \"${registry}\"`;\n if (username) {\n pushMsg += ` as \"${username}\"`;\n }\n core.info(pushMsg);\n\n let creds = \"\";\n if (username && !password) {\n core.warning(\"Username is provided, but password is missing\");\n }\n else if (!username && password) {\n core.warning(\"Password is provided, but username is missing\");\n }\n else if (username && password) {\n creds = `${username}:${password}`;\n }\n\n let digestFile = digestFileInput;\n const imageNameWithTag = `${imageToPush}:${tagsList[0]}`;\n if (!digestFile) {\n digestFile = `${imageNameWithTag.replace(\n /[/\\\\/?%*:|\"<>]/g,\n \"-\",\n )}_digest.txt`;\n }\n\n const registryWithoutTrailingSlash = registry.replace(/\\/$/, \"\");\n const registryPath = `${registryWithoutTrailingSlash}/${imageInput}`;\n core.info(`Combining image name \"${imageInput}\" and registry \"${registry}\" `\n + `to form registry path \"${registryPath}\"`);\n\n if (imageInput.indexOf(\"/\") > -1 && registry.indexOf(\"/\") > -1) {\n core.warning(`\"${registryPath}\" does not seem to be a valid registry path. `\n + `The registry path should not contain more than 2 slashes. `\n + `Refer to the Inputs section of the readme for naming image and registry.`);\n }\n\n // push the image\n for (const tag of tagsList) {\n const imageWithTag = `${imageToPush}:${tag}`;\n const registryPathWithTag = `${registryPath}:${tag}`;\n const args = [\n \"push\",\n \"--quiet\",\n \"--digestfile\",\n digestFile,\n imageWithTag,\n registryPathWithTag,\n ];\n\n if (podmanExtraArgs.length > 0) {\n args.push(...podmanExtraArgs);\n }\n\n // check if tls-verify is not set to null\n if (tlsVerify) {\n args.push(`--tls-verify=${tlsVerify}`);\n }\n\n // check if registry creds are provided\n if (creds) {\n args.push(`--creds=${creds}`);\n }\n\n await execute(await getPodmanPath(), args);\n core.info(`✅ Successfully pushed \"${imageWithTag}\" to \"${registryPathWithTag}\"`);\n\n registryPathList.push(registryPathWithTag);\n\n try {\n const digest = (await fs.promises.readFile(digestFile)).toString();\n core.info(digest);\n // the digest should be the same for every image, but we log it every time\n // due to https://github.com/redhat-actions/push-to-registry/issues/26\n core.setOutput(Outputs.DIGEST, digest);\n }\n catch (err) {\n core.warning(`Failed to read digest file \"${digestFile}\": ${err}`);\n }\n }\n\n core.setOutput(Outputs.REGISTRY_PATH, registryPathList[0]);\n core.setOutput(Outputs.REGISTRY_PATHS, JSON.stringify(registryPathList));\n}\n\nasync function pullImageFromDocker(): Promise {\n core.info(`🔍 Checking if \"${imageToPush}\" with tag${tagsList.length !== 1 ? \"s\" : \"\"} `\n + `\"${tagsList.join(\", \")}\" is present in the local Docker image storage`);\n let imageWithTag;\n const foundTags: string[] = [];\n const missingTags: string[] = [];\n try {\n for (const tag of tagsList) {\n imageWithTag = `${imageToPush}:${tag}`;\n const commandResult: ExecResult = await execute(\n await getPodmanPath(),\n [ \"pull\", `docker-daemon:${imageWithTag}` ],\n { ignoreReturnCode: true, failOnStdErr: false, group: true }\n );\n if (commandResult.exitCode === 0) {\n foundTags.push(tag);\n }\n else {\n missingTags.push(tag);\n }\n }\n }\n catch (err) {\n core.warning(err);\n }\n\n return {\n foundTags,\n missingTags,\n };\n}\n\nasync function checkImageInPodman(): Promise {\n // check if images exist in Podman's storage\n core.info(`🔍 Checking if \"${imageToPush}\" with tag${tagsList.length !== 1 ? \"s\" : \"\"} `\n + `\"${tagsList.join(\", \")}\" is present in the local Podman image storage`);\n let imageWithTag;\n const foundTags: string[] = [];\n const missingTags: string[] = [];\n try {\n for (const tag of tagsList) {\n imageWithTag = `${imageToPush}:${tag}`;\n const commandResult: ExecResult = await execute(\n await getPodmanPath(),\n [ \"image\", \"exists\", imageWithTag ],\n { ignoreReturnCode: true }\n );\n if (commandResult.exitCode === 0) {\n foundTags.push(tag);\n }\n else {\n missingTags.push(tag);\n }\n }\n }\n catch (err) {\n core.debug(err);\n }\n\n return {\n foundTags,\n missingTags,\n };\n}\n\nasync function isPodmanLocalImageLatest(): Promise {\n // checking for only one tag as creation time will be\n // same for all the tags present\n const imageWithTag = `${imageToPush}:${tagsList[0]}`;\n\n // get creation time of the image present in the Podman image storage\n const podmanLocalImageTimeStamp = await execute(await getPodmanPath(), [\n \"image\",\n \"inspect\",\n imageWithTag,\n \"--format\",\n \"{{.Created}}\",\n ]);\n\n // get creation time of the image pulled from the Docker image storage\n // appending 'docker.io/library' infront of image name as pulled image name\n // from Docker image storage starts with the 'docker.io/library'\n const pulledImageCreationTimeStamp = await execute(await getPodmanPath(), [\n \"image\",\n \"inspect\",\n `${dockerBaseUrl}/${imageWithTag}`,\n \"--format\",\n \"{{.Created}}\",\n ]);\n\n const podmanImageTime = new Date(podmanLocalImageTimeStamp.stdout).getTime();\n\n const dockerImageTime = new Date(pulledImageCreationTimeStamp.stdout).getTime();\n\n return podmanImageTime > dockerImageTime;\n}\n\n// remove the pulled image from the Podman image storage\nasync function removeDockerImage(): Promise {\n if (imageToPush) {\n core.info(`Removing \"${imageToPush}\" from the Podman image storage`);\n for (const tag of tagsList) {\n const imageWithTag = `${imageToPush}:${tag}`;\n await execute(await getPodmanPath(), [ \"rmi\", imageWithTag ]);\n }\n }\n}\n\nasync function execute(\n executable: string,\n args: string[],\n execOptions: exec.ExecOptions & { group?: boolean } = {},\n): Promise {\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 = [ executable, ...args ].join(\" \");\n core.startGroup(groupName);\n }\n\n try {\n const exitCode = await exec.exec(executable, args, finalExecOptions);\n\n if (execOptions.ignoreReturnCode !== true && exitCode !== 0) {\n // Throwing the stderr as part of the Error makes the stderr show up in the action outline,\n // which saves some clicking when debugging.\n let error = `${path.basename(executable)} exited with code ${exitCode}`;\n if (stderr) {\n error += `\\n${stderr}`;\n }\n throw new Error(error);\n }\n\n return {\n exitCode,\n stdout,\n stderr,\n };\n }\n\n finally {\n if (execOptions.group) {\n core.endGroup();\n }\n }\n}\n\nrun()\n .then(async () => {\n if (isImageFromDocker) {\n await removeDockerImage();\n }\n })\n .catch((err) => {\n core.setFailed(err.message);\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\nexport function splitByNewline(s: string): string[] {\n return s.split(/\\r?\\n/);\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:/push-to-registry/node_modules/@actions/core/lib/command.js","../webpack:/push-to-registry/node_modules/@actions/core/lib/core.js","../webpack:/push-to-registry/node_modules/@actions/core/lib/file-command.js","../webpack:/push-to-registry/node_modules/@actions/core/lib/utils.js","../webpack:/push-to-registry/node_modules/@actions/exec/lib/exec.js","../webpack:/push-to-registry/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/push-to-registry/node_modules/@actions/io/lib/io-util.js","../webpack:/push-to-registry/node_modules/@actions/io/lib/io.js","../webpack:/push-to-registry/node_modules/ini/ini.js","../webpack:/push-to-registry/src/generated/inputs-outputs.ts","../webpack:/push-to-registry/src/index.ts","../webpack:/push-to-registry/src/util.ts","../webpack:/push-to-registry/external \"assert\"","../webpack:/push-to-registry/external \"child_process\"","../webpack:/push-to-registry/external \"events\"","../webpack:/push-to-registry/external \"fs\"","../webpack:/push-to-registry/external \"os\"","../webpack:/push-to-registry/external \"path\"","../webpack:/push-to-registry/external \"string_decoder\"","../webpack:/push-to-registry/external \"timers\"","../webpack:/push-to-registry/external \"util\"","../webpack:/push-to-registry/webpack/bootstrap","../webpack:/push-to-registry/webpack/runtime/compat","../webpack:/push-to-registry/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","__createBinding","create","o","m","k2","enumerable","get","__setModuleDefault","v","getExecOutput","exec","string_decoder_1","tr","commandLine","args","commandArgs","argStringToArray","toolPath","slice","concat","runner","ToolRunner","_a","_b","stderr","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","listeners","originalStdErrListener","stdErrListener","data","stdOutListener","assign","end","events","child","io","ioUtil","timers_1","IS_WINDOWS","platform","EventEmitter","super","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","a","windowsVerbatimArguments","_windowsQuoteCmdArg","strBuffer","onLine","n","indexOf","line","substring","err","_debug","argline","str","endsWith","upperToolPath","_endsWith","arg","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","char","some","x","reverse","quoteHit","i","split","join","includes","cwd","silent","failOnStdErr","ignoreReturnCode","delay","outStream","errStream","argv0","isRooted","which","optionsNonNull","_cloneExecOptions","_getCommandString","state","ExecState","on","exists","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","assert_1","promises","chmod","copyFile","lstat","mkdir","readdir","readlink","rename","rmdir","stat","symlink","unlink","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","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","Inputs","Outputs","core","inputs_outputs_1","podmanPath","isImageFromDocker","sourceImages","destinationImages","dockerPodmanRoot","dockerPodmanOpts","async","getPodmanPath","execute","run","DEFAULT_TAG","imageInput","IMAGE","tags","TAGS","tagsList","registry","REGISTRY","username","USERNAME","password","PASSWORD","tlsVerify","TLS_VERIFY","digestFileInput","DIGESTFILE","isFullImageNameTag","isFullImageName","tag","registryWithoutTrailingSlash","registryPath","getFullImageName","inputExtraArgsStr","EXTRA_ARGS","podmanExtraArgs","splitByNewline","flatMap","registryPathList","podmanImageStorageCheckResult","checkImageInPodman","podmanFoundTags","foundTags","podmanMissingTags","missingTags","dockerImageStorageCheckResult","pullImageFromDocker","dockerFoundTags","dockerMissingTags","allTagsinPodman","allTagsinDocker","isPodmanImageLatest","isPodmanLocalImageLatest","pushMsg","creds","digestFile","destinationImage","getFullDockerImageName","digest","readFile","DIGEST","REGISTRY_PATH","REGISTRY_PATHS","imageWithTag","commandResult","podmanLocalImageTimeStamp","pulledImageCreationTimeStamp","podmanImageTime","Date","getTime","dockerImageTime","createDockerPodmanImageStroage","mkdtemp","tmpdir","isStorageDriverOverlay","fuseOverlayfsPath","findFuseOverlayfsPath","removeDockerPodmanImageStroage","executable","execOptions","finalExecOptions","groupName","main","catch","ini","fs_1","findStorageDriver","filePaths","storageDriver","fileExists","fileContent","storage","driver","xdgConfigHome","homedir","XDG_CONFIG_HOME","access","image","DOCKER_IO","DOCKER_IO_NAMESPACED","require","__webpack_module_cache__","moduleId","threw","__webpack_modules__","ab","__dirname"],"mappings":"6DACA,IAAAA,EAAAC,MAAAA,KAAAD,cAAA,SAAAE,GACA,GAAAA,GAAAA,EAAAC,WAAA,OAAAD,EACA,IAAAE,EAAA,GACA,GAAAF,GAAA,KAAA,IAAA,IAAAG,KAAAH,EAAA,GAAAI,OAAAC,eAAAC,KAAAN,EAAAG,GAAAD,EAAAC,GAAAH,EAAAG,GACAD,EAAA,WAAAF,EACA,OAAAE,GAEAE,OAAAG,eAAAC,EAAA,aAAA,CAAAC,MAAA,OACA,MAAAC,EAAAZ,EAAAa,EAAA,KACA,MAAAC,EAAAD,EAAA,KAWA,SAAAE,aAAAC,EAAAC,EAAAC,GACA,MAAAC,EAAA,IAAAC,QAAAJ,EAAAC,EAAAC,GACAG,QAAAC,OAAAC,MAAAJ,EAAAK,WAAAZ,EAAAa,KAEAf,EAAAK,aAAAA,aACA,SAAAW,MAAAC,EAAAT,EAAA,IACAH,aAAAY,EAAA,GAAAT,GAEAR,EAAAgB,MAAAA,MACA,MAAAE,EAAA,KACA,MAAAR,QACAS,YAAAb,EAAAC,EAAAC,GACA,IAAAF,EAAA,CACAA,EAAA,kBAEAf,KAAAe,QAAAA,EACAf,KAAAgB,WAAAA,EACAhB,KAAAiB,QAAAA,EAEAW,WACA,IAAAC,EAAAF,EAAA3B,KAAAe,QACA,GAAAf,KAAAgB,YAAAX,OAAAyB,KAAA9B,KAAAgB,YAAAe,OAAA,EAAA,CACAF,GAAA,IACA,IAAAG,EAAA,KACA,IAAA,MAAAC,KAAAjC,KAAAgB,WAAA,CACA,GAAAhB,KAAAgB,WAAAV,eAAA2B,GAAA,CACA,MAAAC,EAAAlC,KAAAgB,WAAAiB,GACA,GAAAC,EAAA,CACA,GAAAF,EAAA,CACAA,EAAA,UAEA,CACAH,GAAA,IAEAA,MAAAI,KAAAE,eAAAD,QAKAL,MAAAF,IAAAS,WAAAp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PAvb,EAAA+Y,uBAAAA,6CChFA7D,EAAAlV,QAAA0b,QAAA,gCCAAxG,EAAAlV,QAAA0b,QAAA,uCCAAxG,EAAAlV,QAAA0b,QAAA,gCCAAxG,EAAAlV,QAAA0b,QAAA,2BCAAxG,EAAAlV,QAAA0b,QAAA,4BCAAxG,EAAAlV,QAAA0b,QAAA,8BCAAxG,EAAAlV,QAAA0b,QAAA,wCCAAxG,EAAAlV,QAAA0b,QAAA,gCCAAxG,EAAAlV,QAAA0b,QAAA,UCCA,IAAAC,EAAA,GAGA,SAAAxb,oBAAAyb,GAEA,GAAAD,EAAAC,GAAA,CACA,OAAAD,EAAAC,GAAA5b,QAGA,IAAAkV,EAAAyG,EAAAC,GAAA,CAGA5b,QAAA,IAIA,IAAA6b,EAAA,KACA,IACAC,EAAAF,GAAA9b,KAAAoV,EAAAlV,QAAAkV,EAAAA,EAAAlV,QAAAG,qBACA0b,EAAA,MACA,QACA,GAAAA,SAAAF,EAAAC,GAIA,OAAA1G,EAAAlV,QCzBAG,oBAAA4b,GAAAC,UAAA,ICEA,OAAA7b,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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\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 (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\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/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\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, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\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 (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\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 });\nexports.argStringToArray = exports.ToolRunner = void 0;\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\"));\nconst timers_1 = require(\"timers\");\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 return 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 return '';\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) => __awaiter(this, void 0, void 0, function* () {\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 if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let 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 stdbuffer = 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 let 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 errbuffer = 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 = timers_1.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","// This file was auto-generated by action-io-generator. Do not edit by hand!\nexport enum Inputs {\n /**\n * After copying the image, write the digest of the resulting image to the file.\n * By default, the filename will be determined from the image and tag.\n * The contents of this file are the digest output.\n * Required: false\n * Default: None.\n */\n DIGESTFILE = \"digestfile\",\n /**\n * Extra args to be passed to podman push.\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 * Name of the image to push (e.g. username/imagename or imagename)\n * Required: false\n * Default: None.\n */\n IMAGE = \"image\",\n /**\n * Password to use as credential to authenticate to the registry\n * Required: false\n * Default: None.\n */\n PASSWORD = \"password\",\n /**\n * Hostname and optional namespace to push the image to (eg. quay.io/username or quay.io)\n * Required: false\n * Default: None.\n */\n REGISTRY = \"registry\",\n /**\n * The tag or tags of the image to push. For multiple tags, seperate by whitespace. For example, \"latest v1\"\n * Required: false\n * Default: \"latest\"\n */\n TAGS = \"tags\",\n /**\n * Verify TLS certificates when contacting the registry\n * Required: false\n * Default: \"true\"\n */\n TLS_VERIFY = \"tls-verify\",\n /**\n * Username to use as credential to authenticate to the registry\n * Required: false\n * Default: None.\n */\n USERNAME = \"username\",\n}\n\nexport enum Outputs {\n /**\n * The pushed image digest, as written to the \"digestfile\"\n * Required: false\n * Default: None.\n */\n DIGEST = \"digest\",\n /**\n * The first element of registry-paths.\n * Required: false\n * Default: None.\n */\n REGISTRY_PATH = \"registry-path\",\n /**\n * A JSON array of registry paths to which the tag(s) were pushed\n * Required: false\n * Default: None.\n */\n REGISTRY_PATHS = \"registry-paths\",\n}\n","import * as core from \"@actions/core\";\nimport * as exec from \"@actions/exec\";\nimport * as io from \"@actions/io\";\nimport * as fs from \"fs\";\nimport * as os from \"os\";\nimport * as path from \"path\";\nimport {\n isStorageDriverOverlay, findFuseOverlayfsPath,\n splitByNewline,\n isFullImageName, getFullImageName,\n getFullDockerImageName,\n} from \"./util\";\nimport { Inputs, Outputs } from \"./generated/inputs-outputs\";\n\ninterface ExecResult {\n exitCode: number;\n stdout: string;\n stderr: string;\n}\n\ninterface ImageStorageCheckResult {\n readonly foundTags: string[];\n readonly missingTags: string[];\n}\n\nlet podmanPath: string | undefined;\n\n// boolean value to check if pushed image is from Docker image storage\nlet isImageFromDocker = false;\nlet sourceImages: string[];\nlet destinationImages: string[];\nlet dockerPodmanRoot: string;\nlet dockerPodmanOpts: string[];\n\nasync function getPodmanPath(): Promise {\n if (podmanPath == null) {\n podmanPath = await io.which(\"podman\", true);\n await execute(podmanPath, [ \"version\" ], { group: true });\n }\n\n return podmanPath;\n}\n\nasync function run(): Promise {\n const DEFAULT_TAG = \"latest\";\n const imageInput = core.getInput(Inputs.IMAGE);\n const tags = core.getInput(Inputs.TAGS);\n // split tags\n const tagsList = 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 const registry = core.getInput(Inputs.REGISTRY);\n const username = core.getInput(Inputs.USERNAME);\n const password = core.getInput(Inputs.PASSWORD);\n const tlsVerify = core.getInput(Inputs.TLS_VERIFY);\n const digestFileInput = core.getInput(Inputs.DIGESTFILE);\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`);\n }\n if (!isFullImageNameTag) {\n if (!imageInput) {\n throw new Error(`Input \"${Inputs.IMAGE}\" must be provided when using non full name tags`);\n }\n if (!registry) {\n throw new Error(`Input \"${Inputs.REGISTRY}\" must be provided when using non full name tags`);\n }\n\n const registryWithoutTrailingSlash = registry.replace(/\\/$/, \"\");\n const registryPath = `${registryWithoutTrailingSlash}/${imageInput}`;\n core.info(`Combining image name \"${imageInput}\" and registry \"${registry}\" `\n + `to form registry path \"${registryPath}\"`);\n if (imageInput.indexOf(\"/\") > -1 && registry.indexOf(\"/\") > -1) {\n core.warning(`\"${registryPath}\" does not seem to be a valid registry path. `\n + `The registry path should not contain more than 2 slashes. `\n + `Refer to the Inputs section of the readme for naming image and registry.`);\n }\n\n sourceImages = tagsList.map((tag) => getFullImageName(imageInput, tag));\n destinationImages = tagsList.map((tag) => getFullImageName(registryPath, tag));\n }\n else {\n if (imageInput) {\n core.warning(`Input \"${Inputs.IMAGE}\" is ignored when using full name tags`);\n }\n if (registry) {\n core.warning(`Input \"${Inputs.REGISTRY}\" is ignored when using full name tags`);\n }\n\n sourceImages = tagsList;\n destinationImages = tagsList;\n }\n\n const inputExtraArgsStr = core.getInput(Inputs.EXTRA_ARGS);\n let podmanExtraArgs: 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 podmanExtraArgs = lines.flatMap((line) => line.split(\" \")).map((arg) => arg.trim());\n }\n\n const registryPathList: string[] = [];\n\n // check if image with all the required tags exist in Podman image storage\n const podmanImageStorageCheckResult: ImageStorageCheckResult = await checkImageInPodman();\n\n const podmanFoundTags: string[] = podmanImageStorageCheckResult.foundTags;\n const podmanMissingTags: string[] = podmanImageStorageCheckResult.missingTags;\n\n if (podmanFoundTags.length > 0) {\n core.info(`Tag${podmanFoundTags.length !== 1 ? \"s\" : \"\"} \"${podmanFoundTags.join(\", \")}\" `\n + `found in Podman image storage`);\n }\n\n // Log warning if few tags are not found\n if (podmanMissingTags.length > 0 && podmanFoundTags.length > 0) {\n core.warning(`Tag${podmanMissingTags.length !== 1 ? \"s\" : \"\"} \"${podmanMissingTags.join(\", \")}\" `\n + `not found in Podman image storage`);\n }\n\n // check if image with all the required tags exist in Docker image storage\n // and if exist pull the image with all the tags to Podman\n const dockerImageStorageCheckResult: ImageStorageCheckResult = await pullImageFromDocker();\n\n const dockerFoundTags: string[] = dockerImageStorageCheckResult.foundTags;\n const dockerMissingTags: string[] = dockerImageStorageCheckResult.missingTags;\n\n if (dockerFoundTags.length > 0) {\n core.info(`Tag${dockerFoundTags.length !== 1 ? \"s\" : \"\"} \"${dockerFoundTags.join(\", \")}\" `\n + `found in Docker image storage`);\n }\n\n // Log warning if few tags are not found\n if (dockerMissingTags.length > 0 && dockerFoundTags.length > 0) {\n core.warning(`Tag${dockerMissingTags.length !== 1 ? \"s\" : \"\"} \"${dockerMissingTags.join(\", \")}\" `\n + `not found in Docker image storage`);\n }\n\n // failing if image with any of the tag is not found in Docker as well as Podman\n if (podmanMissingTags.length > 0 && dockerMissingTags.length > 0) {\n throw new Error(\n `❌ All tags were not found in either Podman image storage, or Docker image storage. `\n + `Tag${podmanMissingTags.length !== 1 ? \"s\" : \"\"} \"${podmanMissingTags.join(\", \")}\" `\n + `not found in Podman image storage, and tag${dockerMissingTags.length !== 1 ? \"s\" : \"\"} `\n + `\"${dockerMissingTags.join(\", \")}\" not found in Docker image storage.`\n );\n }\n\n const allTagsinPodman: boolean = podmanFoundTags.length === tagsList.length;\n const allTagsinDocker: boolean = dockerFoundTags.length === tagsList.length;\n\n if (allTagsinPodman && allTagsinDocker) {\n const isPodmanImageLatest = await isPodmanLocalImageLatest();\n if (!isPodmanImageLatest) {\n core.warning(\n `The version of \"${sourceImages[0]}\" in the Docker image storage is more recent `\n + `than the version in the Podman image storage. The image(s) from the Docker image storage `\n + `will be pushed.`\n );\n isImageFromDocker = true;\n }\n else {\n core.warning(\n `The version of \"${sourceImages[0]}\" in the Podman image storage is more recent `\n + `than the version in the Docker image storage. The image(s) from the Podman image `\n + `storage will be pushed.`\n );\n }\n }\n else if (allTagsinDocker) {\n core.info(\n `Tag \"${sourceImages[0]}\" was found in the Docker image storage, but not in the Podman `\n + `image storage. The image(s) will be pulled into Podman image storage, pushed, and then `\n + `removed from the Podman image storage.`\n );\n isImageFromDocker = true;\n }\n else {\n core.info(\n `Tag \"${sourceImages[0]}\" was found in the Podman image storage, but not in the Docker `\n + `image storage. The image(s) will be pushed from Podman image storage.`\n );\n }\n\n let pushMsg = `⏳ Pushing \"${sourceImages[0]}\" to ${destinationImages.join(\", \")}`;\n if (username) {\n pushMsg += ` as \"${username}\"`;\n }\n core.info(pushMsg);\n\n let creds = \"\";\n if (username && !password) {\n core.warning(\"Username is provided, but password is missing\");\n }\n else if (!username && password) {\n core.warning(\"Password is provided, but username is missing\");\n }\n else if (username && password) {\n creds = `${username}:${password}`;\n }\n\n let digestFile = digestFileInput;\n if (!digestFile) {\n digestFile = `${sourceImages[0].replace(\n /[/\\\\/?%*:|\"<>]/g,\n \"-\",\n )}_digest.txt`;\n }\n\n // push the image\n for (const destinationImage of destinationImages) {\n const args = [\n ...(isImageFromDocker ? dockerPodmanOpts : []),\n \"push\",\n \"--quiet\",\n \"--digestfile\",\n digestFile,\n isImageFromDocker ? getFullDockerImageName(sourceImages[0]) : sourceImages[0],\n destinationImage,\n ];\n\n if (podmanExtraArgs.length > 0) {\n args.push(...podmanExtraArgs);\n }\n\n // check if tls-verify is not set to null\n if (tlsVerify) {\n args.push(`--tls-verify=${tlsVerify}`);\n }\n\n // check if registry creds are provided\n if (creds) {\n args.push(`--creds=${creds}`);\n }\n\n await execute(await getPodmanPath(), args);\n core.info(`✅ Successfully pushed \"${sourceImages[0]}\" to \"${destinationImage}\"`);\n\n registryPathList.push(destinationImage);\n\n try {\n const digest = (await fs.promises.readFile(digestFile)).toString();\n core.info(digest);\n // the digest should be the same for every image, but we log it every time\n // due to https://github.com/redhat-actions/push-to-registry/issues/26\n core.setOutput(Outputs.DIGEST, digest);\n }\n catch (err) {\n core.warning(`Failed to read digest file \"${digestFile}\": ${err}`);\n }\n }\n\n core.setOutput(Outputs.REGISTRY_PATH, registryPathList[0]);\n core.setOutput(Outputs.REGISTRY_PATHS, JSON.stringify(registryPathList));\n}\n\nasync function pullImageFromDocker(): Promise {\n core.info(`🔍 Checking if \"${sourceImages.join(\", \")}\" present in the local Docker image storage`);\n const foundTags: string[] = [];\n const missingTags: string[] = [];\n try {\n for (const imageWithTag of sourceImages) {\n const commandResult: ExecResult = await execute(\n await getPodmanPath(),\n [ ...dockerPodmanOpts, \"pull\", `docker-daemon:${imageWithTag}` ],\n { ignoreReturnCode: true, failOnStdErr: false, group: true }\n );\n if (commandResult.exitCode === 0) {\n foundTags.push(imageWithTag);\n }\n else {\n missingTags.push(imageWithTag);\n }\n }\n }\n catch (err) {\n core.warning(err);\n }\n\n return {\n foundTags,\n missingTags,\n };\n}\n\nasync function checkImageInPodman(): Promise {\n // check if images exist in Podman's storage\n core.info(`🔍 Checking if \"${sourceImages.join(\", \")}\" present in the local Podman image storage`);\n const foundTags: string[] = [];\n const missingTags: string[] = [];\n try {\n for (const imageWithTag of sourceImages) {\n const commandResult: ExecResult = await execute(\n await getPodmanPath(),\n [ \"image\", \"exists\", imageWithTag ],\n { ignoreReturnCode: true }\n );\n if (commandResult.exitCode === 0) {\n foundTags.push(imageWithTag);\n }\n else {\n missingTags.push(imageWithTag);\n }\n }\n }\n catch (err) {\n core.debug(err);\n }\n\n return {\n foundTags,\n missingTags,\n };\n}\n\nasync function isPodmanLocalImageLatest(): Promise {\n // checking for only one tag as creation time will be\n // same for all the tags present\n const imageWithTag = sourceImages[0];\n\n // get creation time of the image present in the Podman image storage\n const podmanLocalImageTimeStamp = await execute(await getPodmanPath(), [\n \"image\",\n \"inspect\",\n imageWithTag,\n \"--format\",\n \"{{.Created}}\",\n ]);\n\n // get creation time of the image pulled from the Docker image storage\n // appending 'docker.io/library' infront of image name as pulled image name\n // from Docker image storage starts with the 'docker.io/library'\n const pulledImageCreationTimeStamp = await execute(await getPodmanPath(), [\n ...dockerPodmanOpts,\n \"image\",\n \"inspect\",\n getFullDockerImageName(imageWithTag),\n \"--format\",\n \"{{.Created}}\",\n ]);\n\n const podmanImageTime = new Date(podmanLocalImageTimeStamp.stdout).getTime();\n\n const dockerImageTime = new Date(pulledImageCreationTimeStamp.stdout).getTime();\n\n return podmanImageTime > dockerImageTime;\n}\n\nasync function createDockerPodmanImageStroage(): Promise {\n core.info(`Creating temporary Podman image storage for pulling from Docker daemon`);\n dockerPodmanRoot = await fs.promises.mkdtemp(path.join(os.tmpdir(), \"podman-from-docker-\"));\n\n dockerPodmanOpts = [ \"--root\", dockerPodmanRoot ];\n\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 dockerPodmanOpts.push(\"--storage-opt\");\n dockerPodmanOpts.push(`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\nasync function removeDockerPodmanImageStroage(): Promise {\n if (dockerPodmanRoot) {\n try {\n core.info(`Removing temporary Podman image storage for pulling from Docker daemon`);\n await execute(\n await getPodmanPath(),\n [ ...dockerPodmanOpts, \"rmi\", \"-a\", \"-f\" ]\n );\n await fs.promises.rmdir(dockerPodmanRoot, { recursive: true });\n }\n catch (err) {\n core.warning(`Failed to remove podman image stroage ${dockerPodmanRoot}: ${err}`);\n }\n }\n}\n\nasync function execute(\n executable: string,\n args: string[],\n execOptions: exec.ExecOptions & { group?: boolean } = {},\n): Promise {\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 = [ executable, ...args ].join(\" \");\n core.startGroup(groupName);\n }\n\n try {\n const exitCode = await exec.exec(executable, args, finalExecOptions);\n\n if (execOptions.ignoreReturnCode !== true && exitCode !== 0) {\n // Throwing the stderr as part of the Error makes the stderr show up in the action outline,\n // which saves some clicking when debugging.\n let error = `${path.basename(executable)} exited with code ${exitCode}`;\n if (stderr) {\n error += `\\n${stderr}`;\n }\n throw new Error(error);\n }\n\n return {\n exitCode,\n stdout,\n stderr,\n };\n }\n\n finally {\n if (execOptions.group) {\n core.endGroup();\n }\n }\n}\n\nasync function main(): Promise {\n try {\n await createDockerPodmanImageStroage();\n await run();\n }\n finally {\n await removeDockerPodmanImageStroage();\n }\n}\n\nmain()\n .catch((err) => {\n core.setFailed(err.message);\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 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\";\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 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\nconst DOCKER_IO = `docker.io`;\nconst DOCKER_IO_NAMESPACED = DOCKER_IO + `/library`;\n\nexport function getFullDockerImageName(image: string): string {\n switch (image.split(\"/\").length) {\n case 1:\n return `${DOCKER_IO_NAMESPACED}/${image}`;\n case 2:\n return `${DOCKER_IO}/${image}`;\n default:\n return image;\n }\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(\"string_decoder\");;","module.exports = require(\"timers\");;","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/package-lock.json b/package-lock.json index 1800ce9..6ba30d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,9 +10,9 @@ "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" }, "@actions/exec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", - "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.0.tgz", + "integrity": "sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==", "requires": { "@actions/io": "^1.0.1" } @@ -139,6 +139,12 @@ "integrity": "sha512-t+i85G2LLauDOlH3MQqxVblCKMt5yyRHZsO7NoVKE8T1W1aIosH1bs5xH2RqwXaWw2Si+r66W/tuHRQzKbR51w==", "dev": true }, + "@types/ini": { + "version": "1.3.31", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.31.tgz", + "integrity": "sha512-8ecxxaG4AlVEM1k9+BsziMw8UsX0qy3jYI1ad/71RrDZ+rdL6aZB0wLfAuflQiDhkD5o4yJ0uPK3OSUic3fG0w==", + "dev": true + }, "@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", @@ -1156,6 +1162,11 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", diff --git a/package.json b/package.json index 01d44b2..5bca125 100644 --- a/package.json +++ b/package.json @@ -14,13 +14,15 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.2.6", - "@actions/exec": "^1.0.4", - "@actions/io": "^1.0.2" + "@actions/exec": "^1.1.0", + "@actions/io": "^1.0.2", + "ini": "^2.0.0" }, "devDependencies": { "@redhat-actions/action-io-generator": "^1.5.0", "@redhat-actions/eslint-config": "^1.3.2", "@redhat-actions/tsconfig": "^1.1.1", + "@types/ini": "^1.3.30", "@types/node": "^12.12.7", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", diff --git a/src/generated/inputs-outputs.ts b/src/generated/inputs-outputs.ts index 9dc6857..db63f10 100644 --- a/src/generated/inputs-outputs.ts +++ b/src/generated/inputs-outputs.ts @@ -17,7 +17,7 @@ export enum Inputs { EXTRA_ARGS = "extra-args", /** * Name of the image to push (e.g. username/imagename or imagename) - * Required: true + * Required: false * Default: None. */ IMAGE = "image", @@ -29,12 +29,12 @@ export enum Inputs { PASSWORD = "password", /** * Hostname and optional namespace to push the image to (eg. quay.io/username or quay.io) - * Required: true + * Required: false * Default: None. */ REGISTRY = "registry", /** - * The tag or tags of the image to push. For multiple tags, seperate by a space. For example, "latest v1" + * The tag or tags of the image to push. For multiple tags, seperate by whitespace. For example, "latest v1" * Required: false * Default: "latest" */ diff --git a/src/index.ts b/src/index.ts index 00c7d5f..9eaf94b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,8 +2,14 @@ import * as core from "@actions/core"; import * as exec from "@actions/exec"; import * as io from "@actions/io"; import * as fs from "fs"; +import * as os from "os"; import * as path from "path"; -import { splitByNewline } from "./util"; +import { + isStorageDriverOverlay, findFuseOverlayfsPath, + splitByNewline, + isFullImageName, getFullImageName, + getFullDockerImageName, +} from "./util"; import { Inputs, Outputs } from "./generated/inputs-outputs"; interface ExecResult { @@ -21,9 +27,10 @@ let podmanPath: string | undefined; // boolean value to check if pushed image is from Docker image storage let isImageFromDocker = false; -let imageToPush: string; -let tagsList: string[]; -let dockerBaseUrl: string; +let sourceImages: string[]; +let destinationImages: string[]; +let dockerPodmanRoot: string; +let dockerPodmanOpts: string[]; async function getPodmanPath(): Promise { if (podmanPath == null) { @@ -34,31 +41,62 @@ async function getPodmanPath(): Promise { return podmanPath; } -// base URL that gets appended if image is pulled from the Docker imaege storage -const DOCKER_IO = `docker.io`; -const DOCKER_IO_NAMESPACED = DOCKER_IO + `/library`; - async function run(): Promise { const DEFAULT_TAG = "latest"; - const imageInput = core.getInput(Inputs.IMAGE, { required: true }); + const imageInput = core.getInput(Inputs.IMAGE); const tags = core.getInput(Inputs.TAGS); // split tags - tagsList = tags.split(" "); - - // handle the case when image name is 'namespace/imagename' and image is present in docker storage - dockerBaseUrl = imageInput.indexOf("/") > -1 ? DOCKER_IO : DOCKER_IO_NAMESPACED; + const tagsList = tags.trim().split(/\s+/); // info message if user doesn't provides any tag if (tagsList.length === 0) { core.info(`Input "${Inputs.TAGS}" is not provided, using default tag "${DEFAULT_TAG}"`); tagsList.push(DEFAULT_TAG); } - const registry = core.getInput(Inputs.REGISTRY, { required: true }); + const registry = core.getInput(Inputs.REGISTRY); const username = core.getInput(Inputs.USERNAME); const password = core.getInput(Inputs.PASSWORD); const tlsVerify = core.getInput(Inputs.TLS_VERIFY); const digestFileInput = core.getInput(Inputs.DIGESTFILE); + // check if all tags provided are in `image:tag` format + const isFullImageNameTag = isFullImageName(tagsList[0]); + if (tagsList.some((tag) => isFullImageName(tag) !== isFullImageNameTag)) { + throw new Error(`Input "${Inputs.TAGS}" cannot have a mix of full name and non full name tags`); + } + if (!isFullImageNameTag) { + if (!imageInput) { + throw new Error(`Input "${Inputs.IMAGE}" must be provided when using non full name tags`); + } + if (!registry) { + throw new Error(`Input "${Inputs.REGISTRY}" must be provided when using non full name tags`); + } + + const registryWithoutTrailingSlash = registry.replace(/\/$/, ""); + const registryPath = `${registryWithoutTrailingSlash}/${imageInput}`; + core.info(`Combining image name "${imageInput}" and registry "${registry}" ` + + `to form registry path "${registryPath}"`); + if (imageInput.indexOf("/") > -1 && registry.indexOf("/") > -1) { + core.warning(`"${registryPath}" does not seem to be a valid registry path. ` + + `The registry path should not contain more than 2 slashes. ` + + `Refer to the Inputs section of the readme for naming image and registry.`); + } + + sourceImages = tagsList.map((tag) => getFullImageName(imageInput, tag)); + destinationImages = tagsList.map((tag) => getFullImageName(registryPath, tag)); + } + else { + if (imageInput) { + core.warning(`Input "${Inputs.IMAGE}" is ignored when using full name tags`); + } + if (registry) { + core.warning(`Input "${Inputs.REGISTRY}" is ignored when using full name tags`); + } + + sourceImages = tagsList; + destinationImages = tagsList; + } + const inputExtraArgsStr = core.getInput(Inputs.EXTRA_ARGS); let podmanExtraArgs: string[] = []; if (inputExtraArgsStr) { @@ -68,7 +106,6 @@ async function run(): Promise { podmanExtraArgs = lines.flatMap((line) => line.split(" ")).map((arg) => arg.trim()); } - imageToPush = `${imageInput}`; const registryPathList: string[] = []; // check if image with all the required tags exist in Podman image storage @@ -79,13 +116,13 @@ async function run(): Promise { if (podmanFoundTags.length > 0) { core.info(`Tag${podmanFoundTags.length !== 1 ? "s" : ""} "${podmanFoundTags.join(", ")}" ` - + `of "${imageToPush}" found in Podman image storage`); + + `found in Podman image storage`); } // Log warning if few tags are not found if (podmanMissingTags.length > 0 && podmanFoundTags.length > 0) { core.warning(`Tag${podmanMissingTags.length !== 1 ? "s" : ""} "${podmanMissingTags.join(", ")}" ` - + `of "${imageToPush}" not found in Podman image storage`); + + `not found in Podman image storage`); } // check if image with all the required tags exist in Docker image storage @@ -97,19 +134,19 @@ async function run(): Promise { if (dockerFoundTags.length > 0) { core.info(`Tag${dockerFoundTags.length !== 1 ? "s" : ""} "${dockerFoundTags.join(", ")}" ` - + `of "${imageToPush}" found in Docker image storage`); + + `found in Docker image storage`); } // Log warning if few tags are not found if (dockerMissingTags.length > 0 && dockerFoundTags.length > 0) { core.warning(`Tag${dockerMissingTags.length !== 1 ? "s" : ""} "${dockerMissingTags.join(", ")}" ` - + `of "${imageToPush}" not found in Docker image storage`); + + `not found in Docker image storage`); } // failing if image with any of the tag is not found in Docker as well as Podman if (podmanMissingTags.length > 0 && dockerMissingTags.length > 0) { throw new Error( - `❌ All tags for "${imageToPush}" were not found in either Podman image storage, or Docker image storage. ` + `❌ All tags were not found in either Podman image storage, or Docker image storage. ` + `Tag${podmanMissingTags.length !== 1 ? "s" : ""} "${podmanMissingTags.join(", ")}" ` + `not found in Podman image storage, and tag${dockerMissingTags.length !== 1 ? "s" : ""} ` + `"${dockerMissingTags.join(", ")}" not found in Docker image storage.` @@ -123,25 +160,23 @@ async function run(): Promise { const isPodmanImageLatest = await isPodmanLocalImageLatest(); if (!isPodmanImageLatest) { core.warning( - `The version of "${imageToPush}" in the Docker image storage is more recent ` + `The version of "${sourceImages[0]}" in the Docker image storage is more recent ` + `than the version in the Podman image storage. The image(s) from the Docker image storage ` + `will be pushed.` ); - imageToPush = `${dockerBaseUrl}/${imageToPush}`; isImageFromDocker = true; } else { core.warning( - `The version of "${imageToPush}" in the Podman image storage is more recent ` + `The version of "${sourceImages[0]}" in the Podman image storage is more recent ` + `than the version in the Docker image storage. The image(s) from the Podman image ` + `storage will be pushed.` ); } } else if (allTagsinDocker) { - imageToPush = `${dockerBaseUrl}/${imageToPush}`; core.info( - `"${imageToPush}" was found in the Docker image storage, but not in the Podman ` + `Tag "${sourceImages[0]}" was found in the Docker image storage, but not in the Podman ` + `image storage. The image(s) will be pulled into Podman image storage, pushed, and then ` + `removed from the Podman image storage.` ); @@ -149,13 +184,12 @@ async function run(): Promise { } else { core.info( - `"${imageToPush}" was found in the Podman image storage, but not in the Docker ` + `Tag "${sourceImages[0]}" was found in the Podman image storage, but not in the Docker ` + `image storage. The image(s) will be pushed from Podman image storage.` ); } - let pushMsg = `⏳ Pushing "${imageToPush}" with tag${tagsList.length !== 1 ? "s" : ""} ` - + `"${tagsList.join(", ")}" to "${registry}"`; + let pushMsg = `⏳ Pushing "${sourceImages[0]}" to ${destinationImages.join(", ")}`; if (username) { pushMsg += ` as "${username}"`; } @@ -173,36 +207,23 @@ async function run(): Promise { } let digestFile = digestFileInput; - const imageNameWithTag = `${imageToPush}:${tagsList[0]}`; if (!digestFile) { - digestFile = `${imageNameWithTag.replace( + digestFile = `${sourceImages[0].replace( /[/\\/?%*:|"<>]/g, "-", )}_digest.txt`; } - const registryWithoutTrailingSlash = registry.replace(/\/$/, ""); - const registryPath = `${registryWithoutTrailingSlash}/${imageInput}`; - core.info(`Combining image name "${imageInput}" and registry "${registry}" ` - + `to form registry path "${registryPath}"`); - - if (imageInput.indexOf("/") > -1 && registry.indexOf("/") > -1) { - core.warning(`"${registryPath}" does not seem to be a valid registry path. ` - + `The registry path should not contain more than 2 slashes. ` - + `Refer to the Inputs section of the readme for naming image and registry.`); - } - // push the image - for (const tag of tagsList) { - const imageWithTag = `${imageToPush}:${tag}`; - const registryPathWithTag = `${registryPath}:${tag}`; + for (const destinationImage of destinationImages) { const args = [ + ...(isImageFromDocker ? dockerPodmanOpts : []), "push", "--quiet", "--digestfile", digestFile, - imageWithTag, - registryPathWithTag, + isImageFromDocker ? getFullDockerImageName(sourceImages[0]) : sourceImages[0], + destinationImage, ]; if (podmanExtraArgs.length > 0) { @@ -220,9 +241,9 @@ async function run(): Promise { } await execute(await getPodmanPath(), args); - core.info(`✅ Successfully pushed "${imageWithTag}" to "${registryPathWithTag}"`); + core.info(`✅ Successfully pushed "${sourceImages[0]}" to "${destinationImage}"`); - registryPathList.push(registryPathWithTag); + registryPathList.push(destinationImage); try { const digest = (await fs.promises.readFile(digestFile)).toString(); @@ -241,24 +262,21 @@ async function run(): Promise { } async function pullImageFromDocker(): Promise { - core.info(`🔍 Checking if "${imageToPush}" with tag${tagsList.length !== 1 ? "s" : ""} ` - + `"${tagsList.join(", ")}" is present in the local Docker image storage`); - let imageWithTag; + core.info(`🔍 Checking if "${sourceImages.join(", ")}" present in the local Docker image storage`); const foundTags: string[] = []; const missingTags: string[] = []; try { - for (const tag of tagsList) { - imageWithTag = `${imageToPush}:${tag}`; + for (const imageWithTag of sourceImages) { const commandResult: ExecResult = await execute( await getPodmanPath(), - [ "pull", `docker-daemon:${imageWithTag}` ], + [ ...dockerPodmanOpts, "pull", `docker-daemon:${imageWithTag}` ], { ignoreReturnCode: true, failOnStdErr: false, group: true } ); if (commandResult.exitCode === 0) { - foundTags.push(tag); + foundTags.push(imageWithTag); } else { - missingTags.push(tag); + missingTags.push(imageWithTag); } } } @@ -274,24 +292,21 @@ async function pullImageFromDocker(): Promise { async function checkImageInPodman(): Promise { // check if images exist in Podman's storage - core.info(`🔍 Checking if "${imageToPush}" with tag${tagsList.length !== 1 ? "s" : ""} ` - + `"${tagsList.join(", ")}" is present in the local Podman image storage`); - let imageWithTag; + core.info(`🔍 Checking if "${sourceImages.join(", ")}" present in the local Podman image storage`); const foundTags: string[] = []; const missingTags: string[] = []; try { - for (const tag of tagsList) { - imageWithTag = `${imageToPush}:${tag}`; + for (const imageWithTag of sourceImages) { const commandResult: ExecResult = await execute( await getPodmanPath(), [ "image", "exists", imageWithTag ], { ignoreReturnCode: true } ); if (commandResult.exitCode === 0) { - foundTags.push(tag); + foundTags.push(imageWithTag); } else { - missingTags.push(tag); + missingTags.push(imageWithTag); } } } @@ -308,7 +323,7 @@ async function checkImageInPodman(): Promise { async function isPodmanLocalImageLatest(): Promise { // checking for only one tag as creation time will be // same for all the tags present - const imageWithTag = `${imageToPush}:${tagsList[0]}`; + const imageWithTag = sourceImages[0]; // get creation time of the image present in the Podman image storage const podmanLocalImageTimeStamp = await execute(await getPodmanPath(), [ @@ -323,9 +338,10 @@ async function isPodmanLocalImageLatest(): Promise { // appending 'docker.io/library' infront of image name as pulled image name // from Docker image storage starts with the 'docker.io/library' const pulledImageCreationTimeStamp = await execute(await getPodmanPath(), [ + ...dockerPodmanOpts, "image", "inspect", - `${dockerBaseUrl}/${imageWithTag}`, + getFullDockerImageName(imageWithTag), "--format", "{{.Created}}", ]); @@ -337,13 +353,41 @@ async function isPodmanLocalImageLatest(): Promise { return podmanImageTime > dockerImageTime; } -// remove the pulled image from the Podman image storage -async function removeDockerImage(): Promise { - if (imageToPush) { - core.info(`Removing "${imageToPush}" from the Podman image storage`); - for (const tag of tagsList) { - const imageWithTag = `${imageToPush}:${tag}`; - await execute(await getPodmanPath(), [ "rmi", imageWithTag ]); +async function createDockerPodmanImageStroage(): Promise { + core.info(`Creating temporary Podman image storage for pulling from Docker daemon`); + dockerPodmanRoot = await fs.promises.mkdtemp(path.join(os.tmpdir(), "podman-from-docker-")); + + dockerPodmanOpts = [ "--root", dockerPodmanRoot ]; + + if (await isStorageDriverOverlay()) { + const fuseOverlayfsPath = await findFuseOverlayfsPath(); + if (fuseOverlayfsPath) { + core.info(`Overriding storage mount_program with "fuse-overlayfs" in environment`); + dockerPodmanOpts.push("--storage-opt"); + dockerPodmanOpts.push(`overlay.mount_program=${fuseOverlayfsPath}`); + } + else { + core.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 { + core.info("Storage driver is not 'overlay', so not overriding storage configuration"); + } +} + +async function removeDockerPodmanImageStroage(): Promise { + if (dockerPodmanRoot) { + try { + core.info(`Removing temporary Podman image storage for pulling from Docker daemon`); + await execute( + await getPodmanPath(), + [ ...dockerPodmanOpts, "rmi", "-a", "-f" ] + ); + await fs.promises.rmdir(dockerPodmanRoot, { recursive: true }); + } + catch (err) { + core.warning(`Failed to remove podman image stroage ${dockerPodmanRoot}: ${err}`); } } } @@ -400,12 +444,17 @@ async function execute( } } -run() - .then(async () => { - if (isImageFromDocker) { - await removeDockerImage(); - } - }) +async function main(): Promise { + try { + await createDockerPodmanImageStroage(); + await run(); + } + finally { + await removeDockerPodmanImageStroage(); + } +} + +main() .catch((err) => { core.setFailed(err.message); }); diff --git a/src/util.ts b/src/util.ts index db2b331..3c922c0 100644 --- a/src/util.ts +++ b/src/util.ts @@ -3,6 +3,88 @@ * Licensed under the MIT License. See LICENSE file in the project root for license information. **************************************************************************************************/ +import * as ini from "ini"; +import { promises as fs } from "fs"; +import * as core from "@actions/core"; +import * as path from "path"; +import * as io from "@actions/io"; +import * as os from "os"; + +async function findStorageDriver(filePaths: string[]): Promise { + let storageDriver = ""; + for (const filePath of filePaths) { + core.debug(`Checking if the storage file exists at ${filePath}`); + if (await fileExists(filePath)) { + core.debug(`Storage file exists at ${filePath}`); + const fileContent = ini.parse(await fs.readFile(filePath, "utf-8")); + if (fileContent.storage.driver) { + storageDriver = fileContent.storage.driver; + } + } + } + return storageDriver; +} + +export async function isStorageDriverOverlay(): Promise { + let xdgConfigHome = path.join(os.homedir(), ".config"); + if (process.env.XDG_CONFIG_HOME) { + xdgConfigHome = process.env.XDG_CONFIG_HOME; + } + const filePaths: string[] = [ + "/etc/containers/storage.conf", + path.join(xdgConfigHome, "containers/storage.conf"), + ]; + const storageDriver = await findStorageDriver(filePaths); + return (storageDriver === "overlay"); +} + +async function fileExists(filePath: string): Promise { + try { + await fs.access(filePath); + return true; + } + catch (err) { + return false; + } +} + +export async function findFuseOverlayfsPath(): Promise { + let fuseOverlayfsPath; + try { + fuseOverlayfsPath = await io.which("fuse-overlayfs"); + } + catch (err) { + core.debug(err); + } + + return fuseOverlayfsPath; +} + export function splitByNewline(s: string): string[] { return s.split(/\r?\n/); } + +export function isFullImageName(image: string): boolean { + return image.indexOf(":") > 0; +} + +export function getFullImageName(image: string, tag: string): string { + if (isFullImageName(tag)) { + return tag; + } + return `${image}:${tag}`; +} + +const DOCKER_IO = `docker.io`; +const DOCKER_IO_NAMESPACED = DOCKER_IO + `/library`; + +export function getFullDockerImageName(image: string): string { + switch (image.split("/").length) { + case 1: + return `${DOCKER_IO_NAMESPACED}/${image}`; + case 2: + return `${DOCKER_IO}/${image}`; + default: + return image; + } +}