From ca34cd8ca7a794a8cb3b409ab078d6be81ed8302 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Thu, 21 Sep 2023 15:56:59 -0500 Subject: [PATCH] feat: add output directory for image SBOMs Signed-off-by: Chris Goller --- README.md | 1 + action.yml | 3 +++ dist/index.js | 4 ++-- src/context.ts | 2 ++ src/depot.ts | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 903cd65..746efa5 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ The following inputs can be used as `step.with` keys and match the inputs from [ | `pull` | Bool | Always attempt to pull all referenced images (default `false`) | | `push` | Bool | [Push](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#push) is a shorthand for `--output=type=registry` (default `false`) | | `sbom` | Bool/String | Generate [SBOM](https://docs.docker.com/build/attestations/sbom/) attestation for the build (shorthand for `--attest=type=sbom`) | +| `sbom-dir` | String | Save all image [SBOM](https://docs.docker.com/build/attestations/sbom/) to this output directory | | `secrets` | List | List of [secrets](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=string`, `GIT_AUTH_TOKEN=mytoken`) | | `secret-files` | List | List of [secret files](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=filename`, `MY_SECRET=./secret.txt`) | | `shm-size` | String | Size of [`/dev/shm`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-size-of-devshm---shm-size) (e.g., `2g`) | diff --git a/action.yml b/action.yml index e8cf3e7..1a54d49 100644 --- a/action.yml +++ b/action.yml @@ -97,6 +97,9 @@ inputs: sbom: description: 'Generate SBOM attestation for the build (shorthand for --attest=type=sbom)' required: false + sbom-dir: + description: 'Directory to output SBOMs for each built image' + required: false secrets: description: 'List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken)' required: false diff --git a/dist/index.js b/dist/index.js index 005f64e..f8427e7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -32,13 +32,13 @@ Expecting `+ge.join(", ")+", got '"+(this.terminals_[O]||O)+"'":d1="Parse error `,e};H.prototype.Program=function(t){var e="",r=t.body,a=void 0,i=void 0;if(t.blockParams){var p="BLOCK PARAMS: [";for(a=0,i=t.blockParams.length;a "+e+" }}")};H.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};H.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};H.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};H.prototype.SubExpression=function(t){for(var e=t.params,r=[],a=void 0,i=0,p=e.length;i=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let a=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),a.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let a=this.clone();this.buf[0]=e,a.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},Ni=Di;var Am=12,Dm=13,Nm=10,km=32,Cm=9,Zn=function(t){return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new Ni(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter.map(e=>e.length),t.quote!==null?t.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new Ni(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([Dm],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Nm],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Am],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([km],"utf8").toString(),t.encoding),Buffer.from(Buffer.from([Cm],"utf8").toString(),t.encoding)]}};var ed=function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})};var ki=function(t){let e={};for(let a in t)e[ed(a)]=t[a];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new N("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new N("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new N("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(a){let i=Date.parse(a);return isNaN(i)?a:new Date(i)};else if(typeof e.cast_date!="function")throw new N("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=wr(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new N("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new N("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new N("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new N("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);let r=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new N("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);if(e.delimiter=e.delimiter.map(function(a){if(a==null||a===!1)return Buffer.from(",",e.encoding);if(typeof a=="string"&&(a=Buffer.from(a,e.encoding)),!Buffer.isBuffer(a)||a.length===0)throw new N("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${r}`],e);return a}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(t.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new N("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new N("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new N("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new N("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new N("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(a,i){if(typeof a!="string"&&!Buffer.isBuffer(a))throw new N("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${i},`,`got ${JSON.stringify(a)}`],e);if(a.length===0)throw new N("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(a)}`],e);return typeof a=="string"&&(a=Buffer.from(a,e.encoding)),a}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e};var td=function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},xm=13,Rm=10,Ht={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},rd=function(t={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},r=ki(t);return{info:e,original_options:t,options:r,state:Zn(r),__needMoreData:function(a,i,p){if(p)return!1;let{encoding:s,escape:o,quote:n}=this.options,{quoting:d,needMoreDataSize:u,recordDelimiterMaxLength:l}=this.state,m=i-a-1,f=Math.max(u,l===0?Buffer.from(`\r `,s).length:l,d?(o===null?0:o.length)+n.length:0,d?n.length+l:0);return mT){this.state.stop=!0,s();return}this.state.quoting===!1&&K.length===0&&this.__autoDiscoverRecordDelimiter(D,b)&&(K=this.options.record_delimiter);let U=D[b];if(m===!0&&rs.append(U),(U===xm||U===Rm)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(S!==null&&this.state.quoting===!0&&this.__isEscape(D,b,U)&&b+S.lengthHt[et].equals(this.state.field.toString())?et:!1).filter(Boolean)[0],ft=this.__error(new N("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(G.column)} at line ${G.lines}, value is ${JSON.stringify(this.state.field.toString(n))}`,l1?`(${l1} bom)`:void 0],this.options,G,{field:this.state.field}));if(ft!==void 0)return ft}}else{this.state.quoting=!0,b+=O.length-1;continue}if(this.state.quoting===!1){let G=this.__isRecordDelimiter(U,D,b);if(G!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=d){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),b+=G-1;continue}if(g===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,b+=G-1;continue}this.info.bytes=this.state.bufBytesStart+b;let Y1=this.__onField();if(Y1!==void 0)return Y1;this.info.bytes=this.state.bufBytesStart+b+G;let u1=this.__onRecord(p);if(u1!==void 0)return u1;if(P!==-1&&this.info.records>=P){this.state.stop=!0,s();return}}this.state.commenting=!1,b+=G-1;continue}if(this.state.commenting)continue;if((E===null?0:this.__compareBytes(E,D,b,U))!==0){this.state.commenting=!0;continue}let ft=this.__isDelimiter(D,b,U);if(ft!==0){this.info.bytes=this.state.bufBytesStart+b;let et=this.__onField();if(et!==void 0)return et;b+=ft-1;continue}}}if(this.state.commenting===!1&&l!==0&&this.state.record_length+this.state.field.length>l)return this.__error(new N("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${l}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let ge=u===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(D,b),d1=h===!1||this.state.wasQuoting===!1;if(ge===!0&&d1===!0)this.state.field.append(U);else{if(h===!0&&!this.__isCharTrimable(D,b))return this.__error(new N("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));ge===!1&&(b+=this.__isCharTrimable(D,b)-1);continue}}if(i===!0)if(this.state.quoting===!0){let U=this.__error(new N("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(U!==void 0)return U}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+b;let U=this.__onField();if(U!==void 0)return U;let ge=this.__onRecord(p);if(ge!==void 0)return ge}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=b,this.state.previousBuf=D.slice(b);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(a){let{columns:i,group_columns_by_name:p,encoding:s,info:o,from:n,relax_column_count:d,relax_column_count_less:u,relax_column_count_more:l,raw:m,skip_records_with_empty_values:f}=this.options,{enabled:h,record:g}=this.state;if(h===!1)return this.__resetRecord();let P=g.length;if(i===!0){if(f===!0&&td(g)){this.__resetRecord();return}return this.__firstLineToColumns(g)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=P),P!==this.state.expectedRecordLength){let T=i===!1?new N("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${P} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g}):new N("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${P} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g});if(d===!0||u===!0&&Pthis.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=T;else{let E=this.__error(T);if(E)return E}}if(f===!0&&td(g)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,n===1||this.info.records>=n){let{objname:T}=this.options;if(i!==!1){let E={};for(let S=0,O=g.length;S{let{timchars:n}=this.state;e:for(let d=0;d=0},__compareBytes:function(a,i,p,s){if(a[0]!==s)return 0;let o=a.length;for(let n=1;nthis.state.record.length?a[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var D1=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],a=rd(e),i=n=>{a.options.objname===void 0?r.push(n):r[n[0]]=n[1]},p=()=>{},s=a.parse(t,!1,i,p);if(s!==void 0)throw s;let o=a.parse(void 0,!0,i,p);if(o!==void 0)throw o;return r};var Tr=C(require("fs")),pd=C(require("os")),_t=C(require("path"));function sd(){let t=Ci();return{addHosts:Er(y.getInput("add-hosts")),allow:Er(y.getInput("allow")),attests:y.getMultilineInput("attests"),buildArgs:y.getMultilineInput("build-args"),buildContexts:y.getMultilineInput("build-contexts"),buildPlatform:y.getInput("build-platform"),buildxFallback:y.getBooleanInput("buildx-fallback"),cacheFrom:y.getMultilineInput("cache-from"),cacheTo:y.getMultilineInput("cache-to"),cgroupParent:y.getInput("cgroup-parent"),context:y.getInput("context")||t,file:y.getInput("file"),githubToken:y.getInput("github-token"),labels:y.getMultilineInput("labels"),lint:y.getBooleanInput("lint"),lintFailOn:y.getInput("lint-fail-on"),load:y.getBooleanInput("load"),network:y.getInput("network"),noCache:y.getBooleanInput("no-cache"),noCacheFilters:y.getMultilineInput("no-cache-filters"),outputs:y.getMultilineInput("outputs"),platforms:Er(y.getInput("platforms")),project:y.getInput("project"),provenance:Gm(),pull:y.getBooleanInput("pull"),push:y.getBooleanInput("push"),sbom:y.getInput("sbom"),secretFiles:y.getMultilineInput("secret-files"),secrets:y.getMultilineInput("secrets"),shmSize:y.getInput("shm-size"),ssh:y.getMultilineInput("ssh"),tags:Er(y.getInput("tags")),target:y.getInput("target"),token:y.getInput("token")||process.env.DEPOT_TOKEN,ulimit:y.getMultilineInput("ulimit")}}var br;function Ci(){if(br)return br;let t=process.env.GITHUB_SERVER_URL||"https://github.com",e=Im();return br=`${t}/${xe.context.repo.owner}/${xe.context.repo.repo}.git#${e}`,br}function Gm(){let t=y.getInput("provenance");if(!t)return t;try{return y.getBooleanInput("provenance")?`builder-id=${od()}`:"false"}catch{return Sr(t)}}function Sr(t){let e=D1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let r of e)if(r.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return t;return`${t},builder-id=${od()}`}function od(){return`${process.env.GITHUB_SERVER_URL||"https://github.com"}/${xe.context.repo.owner}/${xe.context.repo.repo}/actions/runs/${xe.context.runId}`}function Im(){let t=xe.context.ref;return xe.context.sha&&t&&!t.startsWith("refs/")&&(t=`refs/heads/${xe.context.ref}`),xe.context.sha&&!t.startsWith("refs/pull/")&&(t=xe.context.sha),t}var N1;function Wt(){return N1||(y.getState("tempDir")?y.getState("tempDir"):(N1=Tr.mkdtempSync(_t.join(pd.tmpdir(),"depot-build-push-").split(_t.sep).join(_t.posix.sep)),y.saveState("tempDir",N1),N1))}var id="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function nd(){let t=0;for(;t<20;){let e;try{e=yr.randomBytes(16)}catch{e=yr.pseudoRandomBytes(16)}let r=[];for(let i=0;i<10;i++)r.push(id[e.readUInt8(i)%id.length]);let a=_t.join(Wt(),r.join(""));if(!Tr.existsSync(a))return a;t+=1}throw new Error("Unable to generate a temporary file")}var xi=!!y.getState("isPost");xi||y.saveState("isPost","true");function Er(t){return t=t.trim(),t===""?[]:D1(t,{columns:!1,relaxColumnCount:!0,relaxQuotes:!0,skipEmptyLines:!0}).flatMap(r=>r).map(r=>r.trim()).filter(r=>r)}var Ge=C(Rt()),Sa=C(Ad()),At=C(_r()),f4=C(h1()),h4=C(Li()),g4=C(Rd());var vl=require("node:buffer"),_l=C(require("node:path"),1),qr=C(require("node:child_process"),1),L1=C(require("node:process"),1),wl=C(E2(),1);function $i(t){let e=typeof t=="string"?` +`,p),Buffer.from("\r",p)];e:for(let o=0;othis.state.record.length?a[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var D1=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],a=rd(e),i=n=>{a.options.objname===void 0?r.push(n):r[n[0]]=n[1]},p=()=>{},s=a.parse(t,!1,i,p);if(s!==void 0)throw s;let o=a.parse(void 0,!0,i,p);if(o!==void 0)throw o;return r};var Tr=C(require("fs")),pd=C(require("os")),_t=C(require("path"));function sd(){let t=Ci();return{addHosts:Er(y.getInput("add-hosts")),allow:Er(y.getInput("allow")),attests:y.getMultilineInput("attests"),buildArgs:y.getMultilineInput("build-args"),buildContexts:y.getMultilineInput("build-contexts"),buildPlatform:y.getInput("build-platform"),buildxFallback:y.getBooleanInput("buildx-fallback"),cacheFrom:y.getMultilineInput("cache-from"),cacheTo:y.getMultilineInput("cache-to"),cgroupParent:y.getInput("cgroup-parent"),context:y.getInput("context")||t,file:y.getInput("file"),githubToken:y.getInput("github-token"),labels:y.getMultilineInput("labels"),lint:y.getBooleanInput("lint"),lintFailOn:y.getInput("lint-fail-on"),load:y.getBooleanInput("load"),network:y.getInput("network"),noCache:y.getBooleanInput("no-cache"),noCacheFilters:y.getMultilineInput("no-cache-filters"),outputs:y.getMultilineInput("outputs"),platforms:Er(y.getInput("platforms")),project:y.getInput("project"),provenance:Gm(),pull:y.getBooleanInput("pull"),push:y.getBooleanInput("push"),sbom:y.getInput("sbom"),sbomDir:y.getInput("sbom-dir"),secretFiles:y.getMultilineInput("secret-files"),secrets:y.getMultilineInput("secrets"),shmSize:y.getInput("shm-size"),ssh:y.getMultilineInput("ssh"),tags:Er(y.getInput("tags")),target:y.getInput("target"),token:y.getInput("token")||process.env.DEPOT_TOKEN,ulimit:y.getMultilineInput("ulimit")}}var br;function Ci(){if(br)return br;let t=process.env.GITHUB_SERVER_URL||"https://github.com",e=Im();return br=`${t}/${xe.context.repo.owner}/${xe.context.repo.repo}.git#${e}`,br}function Gm(){let t=y.getInput("provenance");if(!t)return t;try{return y.getBooleanInput("provenance")?`builder-id=${od()}`:"false"}catch{return Sr(t)}}function Sr(t){let e=D1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let r of e)if(r.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return t;return`${t},builder-id=${od()}`}function od(){return`${process.env.GITHUB_SERVER_URL||"https://github.com"}/${xe.context.repo.owner}/${xe.context.repo.repo}/actions/runs/${xe.context.runId}`}function Im(){let t=xe.context.ref;return xe.context.sha&&t&&!t.startsWith("refs/")&&(t=`refs/heads/${xe.context.ref}`),xe.context.sha&&!t.startsWith("refs/pull/")&&(t=xe.context.sha),t}var N1;function Wt(){return N1||(y.getState("tempDir")?y.getState("tempDir"):(N1=Tr.mkdtempSync(_t.join(pd.tmpdir(),"depot-build-push-").split(_t.sep).join(_t.posix.sep)),y.saveState("tempDir",N1),N1))}var id="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function nd(){let t=0;for(;t<20;){let e;try{e=yr.randomBytes(16)}catch{e=yr.pseudoRandomBytes(16)}let r=[];for(let i=0;i<10;i++)r.push(id[e.readUInt8(i)%id.length]);let a=_t.join(Wt(),r.join(""));if(!Tr.existsSync(a))return a;t+=1}throw new Error("Unable to generate a temporary file")}var xi=!!y.getState("isPost");xi||y.saveState("isPost","true");function Er(t){return t=t.trim(),t===""?[]:D1(t,{columns:!1,relaxColumnCount:!0,relaxQuotes:!0,skipEmptyLines:!0}).flatMap(r=>r).map(r=>r.trim()).filter(r=>r)}var Ge=C(Rt()),Sa=C(Ad()),At=C(_r()),f4=C(h1()),h4=C(Li()),g4=C(Rd());var vl=require("node:buffer"),_l=C(require("node:path"),1),qr=C(require("node:child_process"),1),L1=C(require("node:process"),1),wl=C(E2(),1);function $i(t){let e=typeof t=="string"?` `:` `.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,-1)),t[t.length-1]===r&&(t=t.slice(0,-1)),t}var x1=C(require("node:process"),1),Jt=C(require("node:path"),1),y2=C(require("node:url"),1);function kr(t={}){let{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(a=>a.toUpperCase()==="PATH")||"Path"}function H9(t={}){let{cwd:e=x1.default.cwd(),path:r=x1.default.env[kr()],execPath:a=x1.default.execPath}=t,i,p=e instanceof URL?y2.default.fileURLToPath(e):e,s=Jt.default.resolve(p),o=[];for(;i!==s;)o.push(Jt.default.join(s,"node_modules/.bin")),i=s,s=Jt.default.resolve(s,"..");return o.push(Jt.default.resolve(p,a,"..")),[...o,r].join(Jt.default.delimiter)}function T2({env:t=x1.default.env,...e}={}){t={...t};let r=kr({env:t});return e.path=t[r],t[r]=H9(e),t}var W9=(t,e,r,a)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(t,r),p=Object.getOwnPropertyDescriptor(e,r);!z9(i,p)&&a||Object.defineProperty(t,r,p)},z9=function(t,e){return t===void 0||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},$9=(t,e)=>{let r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)},K9=(t,e)=>`/* Wrapped ${t}*/ ${e}`,J9=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Q9=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Y9=(t,e,r)=>{let a=r===""?"":`with ${r.trim()}() `,i=K9.bind(null,a,e.toString());Object.defineProperty(i,"name",Q9),Object.defineProperty(t,"toString",{...J9,value:i})};function Ki(t,e,{ignoreNonConfigurable:r=!1}={}){let{name:a}=t;for(let i of Reflect.ownKeys(e))W9(t,e,i,r);return $9(t,e),Y9(t,e,a),t}var Cr=new WeakMap,S2=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,a=0,i=t.displayName||t.name||"",p=function(...s){if(Cr.set(p,++a),a===1)r=t.apply(this,s),t=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return Ki(p,t),Cr.set(p,a),p};S2.callCount=t=>{if(!Cr.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Cr.get(t)};var P2=S2;var C2=require("node:os");var O2=()=>{let t=D2-A2+1;return Array.from({length:t},X9)},X9=(t,e)=>({name:`SIGRT${e+1}`,number:A2+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),A2=34,D2=64;var k2=require("node:os");var N2=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var Ji=()=>{let t=O2();return[...N2,...t].map(Z9)},Z9=({name:t,number:e,description:r,action:a,forced:i=!1,standard:p})=>{let{signals:{[t]:s}}=k2.constants,o=s!==void 0;return{name:t,number:o?s:e,description:r,supported:o,action:a,forced:i,standard:p}};var e8=()=>{let t=Ji();return Object.fromEntries(t.map(t8))},t8=({name:t,number:e,description:r,supported:a,action:i,forced:p,standard:s})=>[t,{name:t,number:e,description:r,supported:a,action:i,forced:p,standard:s}],x2=e8(),r8=()=>{let t=Ji(),e=64+1,r=Array.from({length:e},(a,i)=>a8(i,t));return Object.assign({},...r)},a8=(t,e)=>{let r=i8(t,e);if(r===void 0)return{};let{name:a,description:i,supported:p,action:s,forced:o,standard:n}=r;return{[t]:{name:a,number:t,description:i,supported:p,action:s,forced:o,standard:n}}},i8=(t,e)=>{let r=e.find(({name:a})=>C2.constants.signals[a]===t);return r!==void 0?r:e.find(a=>a.number===t)},og=r8();var p8=({timedOut:t,timeout:e,errorCode:r,signal:a,signalDescription:i,exitCode:p,isCanceled:s})=>t?`timed out after ${e} milliseconds`:s?"was canceled":r!==void 0?`failed with ${r}`:a!==void 0?`was killed with ${a} (${i})`:p!==void 0?`failed with exit code ${p}`:"failed",R1=({stdout:t,stderr:e,all:r,error:a,signal:i,exitCode:p,command:s,escapedCommand:o,timedOut:n,isCanceled:d,killed:u,parsed:{options:{timeout:l}}})=>{p=p===null?void 0:p,i=i===null?void 0:i;let m=i===void 0?void 0:x2[i].description,f=a&&a.code,g=`Command ${p8({timedOut:n,timeout:l,errorCode:f,signal:i,signalDescription:m,exitCode:p,isCanceled:d})}: ${s}`,P=Object.prototype.toString.call(a)==="[object Error]",T=P?`${g} ${a.message}`:g,E=[T,e,t].filter(Boolean).join(` `);return P?(a.originalMessage=a.message,a.message=E):a=new Error(E),a.shortMessage=T,a.command=s,a.escapedCommand=o,a.exitCode=p,a.signal=i,a.signalDescription=m,a.stdout=t,a.stderr=e,r!==void 0&&(a.all=r),"bufferedData"in a&&delete a.bufferedData,a.failed=!0,a.timedOut=!!n,a.isCanceled=d,a.killed=u&&!n,a};var xr=["stdin","stdout","stderr"],s8=t=>xr.some(e=>t[e]!==void 0),R2=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return xr.map(a=>t[a]);if(s8(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xr.map(a=>`\`${a}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,xr.length);return Array.from({length:r},(a,i)=>e[i])};var B2=C(require("node:os"),1),q2=C(U2(),1),o8=1e3*5,M2=(t,e="SIGTERM",r={})=>{let a=t(e);return n8(t,e,r,a),a},n8=(t,e,r,a)=>{if(!d8(e,r,a))return;let i=u8(r),p=setTimeout(()=>{t("SIGKILL")},i);p.unref&&p.unref()},d8=(t,{forceKillAfterTimeout:e},r)=>l8(t)&&e!==!1&&r,l8=t=>t===B2.default.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",u8=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return o8;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},j2=(t,e)=>{t.kill()&&(e.isCanceled=!0)},m8=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},H2=(t,{timeout:e,killSignal:r="SIGTERM"},a)=>{if(e===0||e===void 0)return a;let i,p=new Promise((o,n)=>{i=setTimeout(()=>{m8(t,r,n)},e)}),s=a.finally(()=>{clearTimeout(i)});return Promise.race([p,s])},W2=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},z2=async(t,{cleanup:e,detached:r},a)=>{if(!e||r)return a;let i=(0,q2.default)(()=>{t.kill()});return a.finally(()=>{i()})};var $2=require("node:fs"),K2=require("node:child_process");function Vr(t){return t!==null&&typeof t=="object"&&typeof t.pipe=="function"}function Xi(t){return Vr(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object"}var c8=t=>t instanceof K2.ChildProcess&&typeof t.then=="function",Zi=(t,e,r)=>{if(typeof r=="string")return t[e].pipe((0,$2.createWriteStream)(r)),t;if(Xi(r))return t[e].pipe(r),t;if(!c8(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!Xi(r.stdin))throw new TypeError("The target child process's stdin must be available.");return t[e].pipe(r.stdin),r},J2=t=>{t.stdout!==null&&(t.pipeStdout=Zi.bind(void 0,t,"stdout")),t.stderr!==null&&(t.pipeStderr=Zi.bind(void 0,t,"stderr")),t.all!==void 0&&(t.pipeAll=Zi.bind(void 0,t,"all"))};var Ur=require("node:fs");var ap=C(X2(),1),tl=C(el(),1),rl=t=>{if(t!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},E8=({input:t,inputFile:e})=>typeof e!="string"?t:(rl(t),(0,Ur.readFileSync)(e)),al=t=>{let e=E8(t);if(Vr(e))throw new TypeError("The `input` option cannot be a stream in sync mode");return e},y8=({input:t,inputFile:e})=>typeof e!="string"?t:(rl(t),(0,Ur.createReadStream)(e)),il=(t,e)=>{let r=y8(e);r!==void 0&&(Vr(r)?r.pipe(t.stdin):t.stdin.end(r))},pl=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let r=(0,tl.default)();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},tp=async(t,e)=>{if(!(!t||e===void 0)){t.destroy();try{return await e}catch(r){return r.bufferedData}}},rp=(t,{encoding:e,buffer:r,maxBuffer:a})=>{if(!(!t||!r))return e?(0,ap.default)(t,{encoding:e,maxBuffer:a}):ap.default.buffer(t,{maxBuffer:a})},sl=async({stdout:t,stderr:e,all:r},{encoding:a,buffer:i,maxBuffer:p},s)=>{let o=rp(t,{encoding:a,buffer:i,maxBuffer:p}),n=rp(e,{encoding:a,buffer:i,maxBuffer:p}),d=rp(r,{encoding:a,buffer:i,maxBuffer:p*2});try{return await Promise.all([s,o,n,d])}catch(u){return Promise.all([{error:u,signal:u.signal,timedOut:u.timedOut},tp(t,o),tp(e,n),tp(r,d)])}};var T8=(async()=>{})().constructor.prototype,S8=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(T8,t)]),ip=(t,e)=>{for(let[r,a]of S8){let i=typeof e=="function"?(...p)=>Reflect.apply(a.value,e(),p):a.value.bind(e);Reflect.defineProperty(t,r,{...a,value:i})}},ol=t=>new Promise((e,r)=>{t.on("exit",(a,i)=>{e({exitCode:a,signal:i})}),t.on("error",a=>{r(a)}),t.stdin&&t.stdin.on("error",a=>{r(a)})});var ll=require("node:buffer"),ul=require("node:child_process"),ml=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],P8=/^[\w.-]+$/,O8=/"/g,A8=t=>typeof t!="string"||P8.test(t)?t:`"${t.replace(O8,'\\"')}"`,pp=(t,e)=>ml(t,e).join(" "),sp=(t,e)=>ml(t,e).map(r=>A8(r)).join(" "),D8=/ +/g;var nl=t=>{let e=typeof t;if(e==="string")return t;if(e==="number")return String(t);if(e==="object"&&t!==null&&!(t instanceof ul.ChildProcess)&&"stdout"in t){let r=typeof t.stdout;if(r==="string")return t.stdout;if(ll.Buffer.isBuffer(t.stdout))return t.stdout.toString();throw new TypeError(`Unexpected "${r}" stdout in template expression`)}throw new TypeError(`Unexpected "${e}" in template expression`)},dl=(t,e,r)=>r||t.length===0||e.length===0?[...t,...e]:[...t.slice(0,-1),`${t[t.length-1]}${e[0]}`,...e.slice(1)],N8=({templates:t,expressions:e,tokens:r,index:a,template:i})=>{let p=i??t.raw[a],s=p.split(D8).filter(Boolean),o=dl(r,s,p.startsWith(" "));if(a===e.length)return o;let n=e[a],d=Array.isArray(n)?n.map(u=>nl(u)):[nl(n)];return dl(o,d,p.endsWith(" "))},op=(t,e)=>{let r=[];for(let[a,i]of t.entries())r=N8({templates:t,expressions:e,tokens:r,index:a,template:i});return r};var cl=require("node:util"),fl=C(require("node:process"),1),hl=(0,cl.debuglog)("execa").enabled,Br=(t,e)=>String(t).padStart(e,"0"),k8=()=>{let t=new Date;return`${Br(t.getHours(),2)}:${Br(t.getMinutes(),2)}:${Br(t.getSeconds(),2)}.${Br(t.getMilliseconds(),3)}`},np=(t,{verbose:e})=>{e&&fl.default.stderr.write(`[${k8()}] ${t} -`)};var C8=1e3*1e3*100,x8=({env:t,extendEnv:e,preferLocal:r,localDir:a,execPath:i})=>{let p=e?{...L1.default.env,...t}:t;return r?T2({env:p,cwd:a,execPath:i}):p},bl=(t,e,r={})=>{let a=wl.default._parse(t,e,r);return t=a.command,e=a.args,r=a.options,r={maxBuffer:C8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||L1.default.cwd(),execPath:L1.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:hl,...r},r.env=x8(r),r.stdio=R2(r),L1.default.platform==="win32"&&_l.default.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:a}},V1=(t,e,r)=>typeof e!="string"&&!vl.Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?$i(e):e;function dp(t,e,r){let a=bl(t,e,r),i=pp(t,e),p=sp(t,e);np(p,a.options),W2(a.options);let s;try{s=qr.default.spawn(a.file,a.args,a.options)}catch(f){let h=new qr.default.ChildProcess,g=Promise.reject(R1({error:f,stdout:"",stderr:"",all:"",command:i,escapedCommand:p,parsed:a,timedOut:!1,isCanceled:!1,killed:!1}));return ip(h,g),h}let o=ol(s),n=H2(s,a.options,o),d=z2(s,a.options,n),u={isCanceled:!1};s.kill=M2.bind(null,s.kill.bind(s)),s.cancel=j2.bind(null,s,u);let m=P2(async()=>{let[{error:f,exitCode:h,signal:g,timedOut:P},T,E,S]=await sl(s,a.options,d),O=V1(a.options,T),K=V1(a.options,E),J=V1(a.options,S);if(f||h!==0||g!==null){let V=R1({error:f,exitCode:h,signal:g,stdout:O,stderr:K,all:J,command:i,escapedCommand:p,parsed:a,timedOut:P,isCanceled:u.isCanceled||(a.options.signal?a.options.signal.aborted:!1),killed:s.killed});if(!a.options.reject)return V;throw V}return{command:i,escapedCommand:p,exitCode:0,stdout:O,stderr:K,all:J,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return il(s,a.options),s.all=pl(s,a.options),J2(s),ip(s,m),s}function R8(t,e,r){let a=bl(t,e,r),i=pp(t,e),p=sp(t,e);np(p,a.options);let s=al(a.options),o;try{o=qr.default.spawnSync(a.file,a.args,{...a.options,input:s})}catch(u){throw R1({error:u,stdout:"",stderr:"",all:"",command:i,escapedCommand:p,parsed:a,timedOut:!1,isCanceled:!1,killed:!1})}let n=V1(a.options,o.stdout,o.error),d=V1(a.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let u=R1({stdout:n,stderr:d,error:o.error,signal:o.signal,exitCode:o.status,command:i,escapedCommand:p,parsed:a,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:!1,killed:o.signal!==null});if(!a.options.reject)return u;throw u}return{command:i,escapedCommand:p,exitCode:0,stdout:n,stderr:d,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}var G8=({input:t,inputFile:e,stdio:r})=>t===void 0&&e===void 0&&r===void 0?{stdin:"inherit"}:{},gl=(t={})=>({preferLocal:!0,...G8(t),...t});function El(t){function e(r,...a){if(!Array.isArray(r))return El({...t,...r});let[i,...p]=op(r,a);return dp(i,p,gl(t))}return e.sync=(r,...a)=>{if(!Array.isArray(r))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[i,...p]=op(r,a);return R8(i,p,gl(t))},e}var Ug=El();var je=C(require("fs")),v4=C(m4()),Xe=C(require("path"));var O7=new f4.HttpClient("depot-build-push-action");async function _4(){try{let{exitCode:t}=await Sa.getExecOutput("depot",[],{ignoreReturnCode:!0,silent:!0});return t===0}catch{return!1}}async function w4(){await Sa.exec("depot",["version"],{failOnStdErr:!1})}async function c4(t,e,r){var s,o;let a=await h4.which(t,!0);console.log(`[command]${a} ${e.join(" ")}`);let i=dp(a,e,{...r,reject:!1,stdin:"inherit",stdout:"pipe",stderr:"pipe"});i.pipeStdout&&i.pipeStdout(process.stdout),i.pipeStderr&&i.pipeStderr(process.stdout);function p(n){i.kill(n)}process.on("SIGINT",p),process.on("SIGTERM",p);try{let n=await i;if(n.stderr.length>0&&n.exitCode!=0)throw new Error(`failed with: ${((o=(s=n.stderr.match(/(.*)\s*$/))==null?void 0:s[0])==null?void 0:o.trim())??"unknown error"}`)}finally{process.off("SIGINT",p),process.off("SIGTERM",p)}}async function b4(t){var o,n,d,u,l,m;let e=Ci(),r=v4.compile(t.context)({defaultContext:e}),a=[...k("--add-host",t.addHosts),...k("--allow",t.allow.join(",")),...k("--attest",t.attests),...k("--build-arg",t.buildArgs),...k("--build-context",t.buildContexts),...k("--cache-from",t.cacheFrom),...k("--cache-to",t.cacheTo),...k("--cgroup-parent",t.cgroupParent),...k("--file",t.file),...k("--iidfile",A7(t.outputs)?!1:E4()),...k("--label",t.labels),...k("--load",t.load),...k("--metadata-file",T4()),...k("--network",t.network),...k("--no-cache",t.noCache),...k("--no-cache-filter",t.noCacheFilters),...k("--output",t.outputs),...k("--platform",t.platforms.join(",")),...k("--pull",t.pull),...k("--push",t.push),...k("--sbom",t.sbom),...k("--shm-size",t.shmSize),...k("--ssh",t.ssh),...k("--tag",t.tags),...k("--target",t.target),...k("--ulimit",t.ulimit),...k("--secret",t.secrets.map(f=>ts(f)).filter(f=>!!f)),...k("--secret",t.secretFiles.map(f=>ts(f,!0)).filter(f=>!!f)),...k("--secret",t.githubToken&&!D7(t.secrets)&&r.startsWith(e)?ts(`GIT_AUTH_TOKEN=${t.githubToken}`):!1)];t.provenance?a.push(...k("--provenance",t.provenance)):N7(t)||(((o=At.context.payload.repository)==null?void 0:o.private)??!1?a.push("--provenance",Sr("mode=min,inline-only=true")):a.push("--provenance",Sr("mode=max")));let i=[...k("--project",t.project),...k("--build-platform",t.buildPlatform),...k("--lint",t.lint),...k("--lint-fail-on",t.lintFailOn)],p=[...a,...i],s=t.token??process.env.DEPOT_TOKEN;if(!s)try{let f=await Ge.getIDToken("https://depot.dev"),h=await O7.postJson("https://github.depot.dev/auth/oidc/github-actions",{token:f});h.result&&h.result.token&&(s=h.result.token,Ge.info("Exchanged GitHub Actions OIDC token for temporary Depot token"))}catch(f){Ge.info(`Unable to exchange GitHub OIDC token for temporary Depot token: ${f}`)}if(!s&&At.context.eventName==="pull_request"&&((n=At.context.payload.repository)==null?void 0:n.private)===!1&&At.context.payload.pull_request&&((u=(d=At.context.payload.pull_request.head)==null?void 0:d.repo)==null?void 0:u.full_name)!==((l=At.context.payload.repository)==null?void 0:l.full_name))try{Ge.info("Attempting to acquire open-source pull request OIDC token");let h=await g4.getIDToken("https://depot.dev");Ge.info("Using open-source pull request OIDC token for Depot authentication"),s=h}catch(h){Ge.info(`Unable to exchange open-source pull request OIDC token for temporary Depot token: ${h}`)}try{await c4("depot",["build",...p,r],{env:{...process.env,...s?{DEPOT_TOKEN:s}:{}}})}catch(f){let h=t.lint&&((m=f.message)==null?void 0:m.includes("linting failed"));if(t.buildxFallback&&!h)Ge.warning(`falling back to buildx: ${f}`),await c4("docker",["buildx","build",...a,r]);else throw f}}function k(t,e){return e?e===!0?[t]:Array.isArray(e)?e.flatMap(r=>[t,r]):[t,e]:[]}function A7(t){let e=D1(t.join(` +`)};var C8=1e3*1e3*100,x8=({env:t,extendEnv:e,preferLocal:r,localDir:a,execPath:i})=>{let p=e?{...L1.default.env,...t}:t;return r?T2({env:p,cwd:a,execPath:i}):p},bl=(t,e,r={})=>{let a=wl.default._parse(t,e,r);return t=a.command,e=a.args,r=a.options,r={maxBuffer:C8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||L1.default.cwd(),execPath:L1.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:hl,...r},r.env=x8(r),r.stdio=R2(r),L1.default.platform==="win32"&&_l.default.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:a}},V1=(t,e,r)=>typeof e!="string"&&!vl.Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?$i(e):e;function dp(t,e,r){let a=bl(t,e,r),i=pp(t,e),p=sp(t,e);np(p,a.options),W2(a.options);let s;try{s=qr.default.spawn(a.file,a.args,a.options)}catch(f){let h=new qr.default.ChildProcess,g=Promise.reject(R1({error:f,stdout:"",stderr:"",all:"",command:i,escapedCommand:p,parsed:a,timedOut:!1,isCanceled:!1,killed:!1}));return ip(h,g),h}let o=ol(s),n=H2(s,a.options,o),d=z2(s,a.options,n),u={isCanceled:!1};s.kill=M2.bind(null,s.kill.bind(s)),s.cancel=j2.bind(null,s,u);let m=P2(async()=>{let[{error:f,exitCode:h,signal:g,timedOut:P},T,E,S]=await sl(s,a.options,d),O=V1(a.options,T),K=V1(a.options,E),J=V1(a.options,S);if(f||h!==0||g!==null){let V=R1({error:f,exitCode:h,signal:g,stdout:O,stderr:K,all:J,command:i,escapedCommand:p,parsed:a,timedOut:P,isCanceled:u.isCanceled||(a.options.signal?a.options.signal.aborted:!1),killed:s.killed});if(!a.options.reject)return V;throw V}return{command:i,escapedCommand:p,exitCode:0,stdout:O,stderr:K,all:J,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return il(s,a.options),s.all=pl(s,a.options),J2(s),ip(s,m),s}function R8(t,e,r){let a=bl(t,e,r),i=pp(t,e),p=sp(t,e);np(p,a.options);let s=al(a.options),o;try{o=qr.default.spawnSync(a.file,a.args,{...a.options,input:s})}catch(u){throw R1({error:u,stdout:"",stderr:"",all:"",command:i,escapedCommand:p,parsed:a,timedOut:!1,isCanceled:!1,killed:!1})}let n=V1(a.options,o.stdout,o.error),d=V1(a.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let u=R1({stdout:n,stderr:d,error:o.error,signal:o.signal,exitCode:o.status,command:i,escapedCommand:p,parsed:a,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:!1,killed:o.signal!==null});if(!a.options.reject)return u;throw u}return{command:i,escapedCommand:p,exitCode:0,stdout:n,stderr:d,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}var G8=({input:t,inputFile:e,stdio:r})=>t===void 0&&e===void 0&&r===void 0?{stdin:"inherit"}:{},gl=(t={})=>({preferLocal:!0,...G8(t),...t});function El(t){function e(r,...a){if(!Array.isArray(r))return El({...t,...r});let[i,...p]=op(r,a);return dp(i,p,gl(t))}return e.sync=(r,...a)=>{if(!Array.isArray(r))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[i,...p]=op(r,a);return R8(i,p,gl(t))},e}var Ug=El();var je=C(require("fs")),v4=C(m4()),Xe=C(require("path"));var O7=new f4.HttpClient("depot-build-push-action");async function _4(){try{let{exitCode:t}=await Sa.getExecOutput("depot",[],{ignoreReturnCode:!0,silent:!0});return t===0}catch{return!1}}async function w4(){await Sa.exec("depot",["version"],{failOnStdErr:!1})}async function c4(t,e,r){var s,o;let a=await h4.which(t,!0);console.log(`[command]${a} ${e.join(" ")}`);let i=dp(a,e,{...r,reject:!1,stdin:"inherit",stdout:"pipe",stderr:"pipe"});i.pipeStdout&&i.pipeStdout(process.stdout),i.pipeStderr&&i.pipeStderr(process.stdout);function p(n){i.kill(n)}process.on("SIGINT",p),process.on("SIGTERM",p);try{let n=await i;if(n.stderr.length>0&&n.exitCode!=0)throw new Error(`failed with: ${((o=(s=n.stderr.match(/(.*)\s*$/))==null?void 0:s[0])==null?void 0:o.trim())??"unknown error"}`)}finally{process.off("SIGINT",p),process.off("SIGTERM",p)}}async function b4(t){var o,n,d,u,l,m;let e=Ci(),r=v4.compile(t.context)({defaultContext:e}),a=[...k("--add-host",t.addHosts),...k("--allow",t.allow.join(",")),...k("--attest",t.attests),...k("--build-arg",t.buildArgs),...k("--build-context",t.buildContexts),...k("--cache-from",t.cacheFrom),...k("--cache-to",t.cacheTo),...k("--cgroup-parent",t.cgroupParent),...k("--file",t.file),...k("--iidfile",A7(t.outputs)?!1:E4()),...k("--label",t.labels),...k("--load",t.load),...k("--metadata-file",T4()),...k("--network",t.network),...k("--no-cache",t.noCache),...k("--no-cache-filter",t.noCacheFilters),...k("--output",t.outputs),...k("--platform",t.platforms.join(",")),...k("--pull",t.pull),...k("--push",t.push),...k("--sbom",t.sbom),...k("--sbom-dir",t.sbomDir),...k("--shm-size",t.shmSize),...k("--ssh",t.ssh),...k("--tag",t.tags),...k("--target",t.target),...k("--ulimit",t.ulimit),...k("--secret",t.secrets.map(f=>ts(f)).filter(f=>!!f)),...k("--secret",t.secretFiles.map(f=>ts(f,!0)).filter(f=>!!f)),...k("--secret",t.githubToken&&!D7(t.secrets)&&r.startsWith(e)?ts(`GIT_AUTH_TOKEN=${t.githubToken}`):!1)];t.provenance?a.push(...k("--provenance",t.provenance)):N7(t)||(((o=At.context.payload.repository)==null?void 0:o.private)??!1?a.push("--provenance",Sr("mode=min,inline-only=true")):a.push("--provenance",Sr("mode=max")));let i=[...k("--project",t.project),...k("--build-platform",t.buildPlatform),...k("--lint",t.lint),...k("--lint-fail-on",t.lintFailOn)],p=[...a,...i],s=t.token??process.env.DEPOT_TOKEN;if(!s)try{let f=await Ge.getIDToken("https://depot.dev"),h=await O7.postJson("https://github.depot.dev/auth/oidc/github-actions",{token:f});h.result&&h.result.token&&(s=h.result.token,Ge.info("Exchanged GitHub Actions OIDC token for temporary Depot token"))}catch(f){Ge.info(`Unable to exchange GitHub OIDC token for temporary Depot token: ${f}`)}if(!s&&At.context.eventName==="pull_request"&&((n=At.context.payload.repository)==null?void 0:n.private)===!1&&At.context.payload.pull_request&&((u=(d=At.context.payload.pull_request.head)==null?void 0:d.repo)==null?void 0:u.full_name)!==((l=At.context.payload.repository)==null?void 0:l.full_name))try{Ge.info("Attempting to acquire open-source pull request OIDC token");let h=await g4.getIDToken("https://depot.dev");Ge.info("Using open-source pull request OIDC token for Depot authentication"),s=h}catch(h){Ge.info(`Unable to exchange open-source pull request OIDC token for temporary Depot token: ${h}`)}try{await c4("depot",["build",...p,r],{env:{...process.env,...s?{DEPOT_TOKEN:s}:{}}})}catch(f){let h=t.lint&&((m=f.message)==null?void 0:m.includes("linting failed"));if(t.buildxFallback&&!h)Ge.warning(`falling back to buildx: ${f}`),await c4("docker",["buildx","build",...a,r]);else throw f}}function k(t,e){return e?e===!0?[t]:Array.isArray(e)?e.flatMap(r=>[t,r]):[t,e]:[]}function A7(t){let e=D1(t.join(` `),{columns:!1,relaxColumnCount:!0,trim:!0});for(let r of e){if(r.length===1&&!r[0].startsWith("type="))return!0;for(let[a,i]of r.map(p=>p.split("=").map(s=>s.trim())))if(a==="type"&&(i==="local"||i==="tar"))return!0}return!1}function D7(t){return t.some(e=>e.startsWith("GIT_AUTH_TOKEN="))}function ts(t,e){try{let r=t.indexOf("="),a=t.substring(0,r),i=t.substring(r+1);if(!a||!i)throw new Error(`Invalid secret: ${t}`);if(e){if(!je.existsSync(i))throw new Error(`Secret file not found: ${i}`);i=je.readFileSync(i,"utf8")}let p=nd();return je.writeFileSync(p,i),`id=${a},src=${p}`}catch(r){Ge.warning(r.message)}}function E4(){return Xe.join(Wt(),"iidfile").split(Xe.sep).join(Xe.posix.sep)}function y4(){let t=E4();if(je.existsSync(t))return je.readFileSync(t,{encoding:"utf-8"}).trim()}function T4(){return Xe.join(Wt(),"metadata-file").split(Xe.sep).join(Xe.posix.sep)}function S4(){let t=T4();if(!je.existsSync(t))return;let e=je.readFileSync(t,{encoding:"utf-8"}).trim();if(e!=="null")return e}function P4(t){return t===void 0?void 0:JSON.parse(t)["containerimage.digest"]}function N7(t){return t.load||t.outputs.some(e=>e.includes("type=docker"))}async function C7(){if(!await _4())return z.setFailed("Depot CLI is not installed. See https://github.com/depot/setup-action to install it before this step.");await z.group("Depot version",async()=>{await w4()});let t=sd();await b4(t);let e=y4(),r=S4(),a=P4(r);e&&await z.group("ImageID",async()=>{z.info(e),z.setOutput("imageid",e)}),a&&await z.group("Digest",async()=>{z.info(a),z.setOutput("digest",a)}),r&&await z.group("Metadata",async()=>{z.info(r),z.setOutput("metadata",r)})}async function x7(){let t=Wt();t.length!==0&&(z.startGroup(`Removing temp folder ${t}`),O4.rmSync(t,{recursive:!0}),z.endGroup())}(xi?x7():C7()).catch(t=>{t instanceof Error?z.setFailed(t.message):z.setFailed(`${t}`)}); /*! Bundled license information: diff --git a/src/context.ts b/src/context.ts index 9431f89..7bcd063 100644 --- a/src/context.ts +++ b/src/context.ts @@ -34,6 +34,7 @@ export interface Inputs { pull: boolean push: boolean sbom: string + sbomDir: string secretFiles: string[] secrets: string[] shmSize: string @@ -74,6 +75,7 @@ export function getInputs(): Inputs { pull: core.getBooleanInput('pull'), push: core.getBooleanInput('push'), sbom: core.getInput('sbom'), + sbomDir: core.getInput('sbom-dir'), secretFiles: core.getMultilineInput('secret-files'), secrets: core.getMultilineInput('secrets'), shmSize: core.getInput('shm-size'), diff --git a/src/depot.ts b/src/depot.ts index 01150af..085b106 100644 --- a/src/depot.ts +++ b/src/depot.ts @@ -78,6 +78,7 @@ export async function build(inputs: Inputs) { ...flag('--pull', inputs.pull), ...flag('--push', inputs.push), ...flag('--sbom', inputs.sbom), + ...flag('--sbom-dir', inputs.sbomDir), ...flag('--shm-size', inputs.shmSize), ...flag('--ssh', inputs.ssh), ...flag('--tag', inputs.tags),