diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml
index c2143f8..0bb9e24 100644
--- a/.github/workflows/verify-build.yml
+++ b/.github/workflows/verify-build.yml
@@ -45,11 +45,11 @@ jobs:
image: ${{ env.IMAGE_NAME }}
# To avoid hardcoding a particular version of the binary.
content: |
- ./spring-petclinic/target/spring-petclinic-*.BUILD-SNAPSHOT.jar
+ ./spring-petclinic/target/spring-petclinic-*.jar
entrypoint: |
java
-jar
- spring-petclinic-*.BUILD-SNAPSHOT.jar
+ spring-petclinic-*.jar
port: 8080
# Check if image is build
diff --git a/README.md b/README.md
index e492886..7e5e942 100644
--- a/README.md
+++ b/README.md
@@ -116,6 +116,13 @@ envs: |
GOPATH=/root/buildah/go
+
+
+ extra-args |
+ No |
+ Extra args to be passed to build command when building image.
+ |
+
## Build Types
@@ -165,6 +172,7 @@ Do not set `dockerfiles` if you are doing a build from scratch. Otherwise those
- `entrypoint` so the container knows what command to run.
- In a Dockerfile, this would be the `ENTRYPOINT`.
- All other optional configuration inputs, such as `port`, `envs`, and `workdir`.
+- `extra-args`
Example of building a Spring Boot Java app image:
```yaml
diff --git a/action.yml b/action.yml
index b8d20e2..11ca7ba 100644
--- a/action.yml
+++ b/action.yml
@@ -44,6 +44,9 @@ inputs:
description: 'Set to true to build using the OCI image format instead of the Docker image format.'
default: 'false'
required: false
+ extra-args:
+ description: 'Extra args to be passed to build command when building image'
+ required: false
runs:
using: 'node12'
main: 'dist/index.js'
diff --git a/dist/index.js b/dist/index.js
index 99f1a6f..9147f7b 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,2 +1,2 @@
-require('./sourcemap-register.js');module.exports=(()=>{var r={7351:function(r,n,i){"use strict";var e=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const o=e(i(2087));const t=i(5278);function issueCommand(r,n,i){const e=new Command(r,n,i);process.stdout.write(e.toString()+o.EOL)}n.issueCommand=issueCommand;function issue(r,n=""){issueCommand(r,{},n)}n.issue=issue;const s="::";class Command{constructor(r,n,i){if(!r){r="missing.command"}this.command=r;this.properties=n;this.message=i}toString(){let r=s+this.command;if(this.properties&&Object.keys(this.properties).length>0){r+=" ";let n=true;for(const i in this.properties){if(this.properties.hasOwnProperty(i)){const e=this.properties[i];if(e){if(n){n=false}else{r+=","}r+=`${i}=${escapeProperty(e)}`}}}}r+=`${s}${escapeData(this.message)}`;return r}}function escapeData(r){return t.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(r){return t.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(r,n,i){"use strict";var e=this&&this.__awaiter||function(r,n,i,e){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,o){function fulfilled(r){try{step(e.next(r))}catch(r){o(r)}}function rejected(r){try{step(e["throw"](r))}catch(r){o(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((e=e.apply(r,n||[])).next())})};var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const t=i(7351);const s=i(717);const u=i(5278);const c=o(i(2087));const f=o(i(5622));var l;(function(r){r[r["Success"]=0]="Success";r[r["Failure"]=1]="Failure"})(l=n.ExitCode||(n.ExitCode={}));function exportVariable(r,n){const i=u.toCommandValue(n);process.env[r]=i;const e=process.env["GITHUB_ENV"]||"";if(e){const n="_GitHubActionsFileCommandDelimeter_";const e=`${r}<<${n}${c.EOL}${i}${c.EOL}${n}`;s.issueCommand("ENV",e)}else{t.issueCommand("set-env",{name:r},i)}}n.exportVariable=exportVariable;function setSecret(r){t.issueCommand("add-mask",{},r)}n.setSecret=setSecret;function addPath(r){const n=process.env["GITHUB_PATH"]||"";if(n){s.issueCommand("PATH",r)}else{t.issueCommand("add-path",{},r)}process.env["PATH"]=`${r}${f.delimiter}${process.env["PATH"]}`}n.addPath=addPath;function getInput(r,n){const i=process.env[`INPUT_${r.replace(/ /g,"_").toUpperCase()}`]||"";if(n&&n.required&&!i){throw new Error(`Input required and not supplied: ${r}`)}return i.trim()}n.getInput=getInput;function setOutput(r,n){t.issueCommand("set-output",{name:r},n)}n.setOutput=setOutput;function setCommandEcho(r){t.issue("echo",r?"on":"off")}n.setCommandEcho=setCommandEcho;function setFailed(r){process.exitCode=l.Failure;error(r)}n.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}n.isDebug=isDebug;function debug(r){t.issueCommand("debug",{},r)}n.debug=debug;function error(r){t.issue("error",r instanceof Error?r.toString():r)}n.error=error;function warning(r){t.issue("warning",r instanceof Error?r.toString():r)}n.warning=warning;function info(r){process.stdout.write(r+c.EOL)}n.info=info;function startGroup(r){t.issue("group",r)}n.startGroup=startGroup;function endGroup(){t.issue("endgroup")}n.endGroup=endGroup;function group(r,n){return e(this,void 0,void 0,function*(){startGroup(r);let i;try{i=yield n()}finally{endGroup()}return i})}n.group=group;function saveState(r,n){t.issueCommand("save-state",{name:r},n)}n.saveState=saveState;function getState(r){return process.env[`STATE_${r}`]||""}n.getState=getState},717:function(r,n,i){"use strict";var e=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const o=e(i(5747));const t=e(i(2087));const s=i(5278);function issueCommand(r,n){const i=process.env[`GITHUB_${r}`];if(!i){throw new Error(`Unable to find environment variable for file command ${r}`)}if(!o.existsSync(i)){throw new Error(`Missing file at path: ${i}`)}o.appendFileSync(i,`${s.toCommandValue(n)}${t.EOL}`,{encoding:"utf8"})}n.issueCommand=issueCommand},5278:(r,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});function toCommandValue(r){if(r===null||r===undefined){return""}else if(typeof r==="string"||r instanceof String){return r}return JSON.stringify(r)}n.toCommandValue=toCommandValue},1514:function(r,n,i){"use strict";var e=this&&this.__awaiter||function(r,n,i,e){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,o){function fulfilled(r){try{step(e.next(r))}catch(r){o(r)}}function rejected(r){try{step(e["throw"](r))}catch(r){o(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((e=e.apply(r,n||[])).next())})};var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const t=o(i(8159));function exec(r,n,i){return e(this,void 0,void 0,function*(){const e=t.argStringToArray(r);if(e.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const o=e[0];n=e.slice(1).concat(n||[]);const s=new t.ToolRunner(o,n,i);return s.exec()})}n.exec=exec},8159:function(r,n,i){"use strict";var e=this&&this.__awaiter||function(r,n,i,e){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,o){function fulfilled(r){try{step(e.next(r))}catch(r){o(r)}}function rejected(r){try{step(e["throw"](r))}catch(r){o(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((e=e.apply(r,n||[])).next())})};var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const t=o(i(2087));const s=o(i(8614));const u=o(i(3129));const c=o(i(5622));const f=o(i(7436));const l=o(i(1962));const a=process.platform==="win32";class ToolRunner extends s.EventEmitter{constructor(r,n,i){super();if(!r){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=r;this.args=n||[];this.options=i||{}}_debug(r){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(r)}}_getCommandString(r,n){const i=this._getSpawnFileName();const e=this._getSpawnArgs(r);let o=n?"":"[command]";if(a){if(this._isCmdFile()){o+=i;for(const r of e){o+=` ${r}`}}else if(r.windowsVerbatimArguments){o+=`"${i}"`;for(const r of e){o+=` ${r}`}}else{o+=this._windowsQuoteCmdArg(i);for(const r of e){o+=` ${this._windowsQuoteCmdArg(r)}`}}}else{o+=i;for(const r of e){o+=` ${r}`}}return o}_processLineBuffer(r,n,i){try{let e=n+r.toString();let o=e.indexOf(t.EOL);while(o>-1){const r=e.substring(0,o);i(r);e=e.substring(o+t.EOL.length);o=e.indexOf(t.EOL)}n=e}catch(r){this._debug(`error processing line. Failed with error ${r}`)}}_getSpawnFileName(){if(a){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(r){if(a){if(this._isCmdFile()){let n=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const i of this.args){n+=" ";n+=r.windowsVerbatimArguments?i:this._windowsQuoteCmdArg(i)}n+='"';return[n]}}return this.args}_endsWith(r,n){return r.endsWith(n)}_isCmdFile(){const r=this.toolPath.toUpperCase();return this._endsWith(r,".CMD")||this._endsWith(r,".BAT")}_windowsQuoteCmdArg(r){if(!this._isCmdFile()){return this._uvQuoteCmdArg(r)}if(!r){return'""'}const n=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let i=false;for(const e of r){if(n.some(r=>r===e)){i=true;break}}if(!i){return r}let e='"';let o=true;for(let n=r.length;n>0;n--){e+=r[n-1];if(o&&r[n-1]==="\\"){e+="\\"}else if(r[n-1]==='"'){o=true;e+='"'}else{o=false}}e+='"';return e.split("").reverse().join("")}_uvQuoteCmdArg(r){if(!r){return'""'}if(!r.includes(" ")&&!r.includes("\t")&&!r.includes('"')){return r}if(!r.includes('"')&&!r.includes("\\")){return`"${r}"`}let n='"';let i=true;for(let e=r.length;e>0;e--){n+=r[e-1];if(i&&r[e-1]==="\\"){n+="\\"}else if(r[e-1]==='"'){i=true;n+="\\"}else{i=false}}n+='"';return n.split("").reverse().join("")}_cloneExecOptions(r){r=r||{};const n={cwd:r.cwd||process.cwd(),env:r.env||process.env,silent:r.silent||false,windowsVerbatimArguments:r.windowsVerbatimArguments||false,failOnStdErr:r.failOnStdErr||false,ignoreReturnCode:r.ignoreReturnCode||false,delay:r.delay||1e4};n.outStream=r.outStream||process.stdout;n.errStream=r.errStream||process.stderr;return n}_getSpawnOptions(r,n){r=r||{};const i={};i.cwd=r.cwd;i.env=r.env;i["windowsVerbatimArguments"]=r.windowsVerbatimArguments||this._isCmdFile();if(r.windowsVerbatimArguments){i.argv0=`"${n}"`}return i}exec(){return e(this,void 0,void 0,function*(){if(!l.isRooted(this.toolPath)&&(this.toolPath.includes("/")||a&&this.toolPath.includes("\\"))){this.toolPath=c.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.which(this.toolPath,true);return new Promise((r,n)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const r of this.args){this._debug(` ${r}`)}const i=this._cloneExecOptions(this.options);if(!i.silent&&i.outStream){i.outStream.write(this._getCommandString(i)+t.EOL)}const e=new ExecState(i,this.toolPath);e.on("debug",r=>{this._debug(r)});const o=this._getSpawnFileName();const s=u.spawn(o,this._getSpawnArgs(i),this._getSpawnOptions(this.options,o));const c="";if(s.stdout){s.stdout.on("data",r=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(r)}if(!i.silent&&i.outStream){i.outStream.write(r)}this._processLineBuffer(r,c,r=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(r)}})})}const f="";if(s.stderr){s.stderr.on("data",r=>{e.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(r)}if(!i.silent&&i.errStream&&i.outStream){const n=i.failOnStdErr?i.errStream:i.outStream;n.write(r)}this._processLineBuffer(r,f,r=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(r)}})})}s.on("error",r=>{e.processError=r.message;e.processExited=true;e.processClosed=true;e.CheckComplete()});s.on("exit",r=>{e.processExitCode=r;e.processExited=true;this._debug(`Exit code ${r} received from tool '${this.toolPath}'`);e.CheckComplete()});s.on("close",r=>{e.processExitCode=r;e.processExited=true;e.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);e.CheckComplete()});e.on("done",(i,e)=>{if(c.length>0){this.emit("stdline",c)}if(f.length>0){this.emit("errline",f)}s.removeAllListeners();if(i){n(i)}else{r(e)}});if(this.options.input){if(!s.stdin){throw new Error("child process missing stdin")}s.stdin.end(this.options.input)}})})}}n.ToolRunner=ToolRunner;function argStringToArray(r){const n=[];let i=false;let e=false;let o="";function append(r){if(e&&r!=='"'){o+="\\"}o+=r;e=false}for(let t=0;t