3
0
Fork 0
mirror of https://gitea.com/docker/build-push-action.git synced 2024-11-29 21:09:36 +01:00
docker-build-push/dist/index.js

22 lines
674 KiB
JavaScript
Raw Normal View History

require('./sourcemap-register.js');(()=>{var __webpack_modules__={5241:function(e,t,a){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,a,r){if(r===undefined)r=a;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,r){if(r===undefined)r=a;e[r]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))r(t,e,a);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=p(a(2037));const o=a(5278);function issueCommand(e,t,a){const r=new Command(e,t,a);process.stdout.write(r.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const n="::";class Command{constructor(e,t,a){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=a}toString(){let e=n+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const r=this.properties[a];if(r){if(t){t=false}else{e+=","}e+=`${a}=${escapeProperty(r)}`}}}}e+=`${n}${escapeData(this.message)}`;return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,a){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,a,r){if(r===undefined)r=a;Object.defineProperty(e,r,{enumerable:true,get:function(){return t[a]}})}:function(e,t,a,r){if(r===undefined)r=a;e[r]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))r(t,e,a);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,a,r){function adopt(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,i){function fulfilled(e){try{step(r.next(e))}catch(e){i(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){i(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const o=a(5241);const n=a(717);const d=a(5278);const l=p(a(2037));const u=p(a(1017));const m=a(8041);var c;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(c=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const a=d.toCommandValue(t);process.env[e]=a;const r=process.env["GITHUB_ENV"]||"";if(r){const t="_GitHubActionsFileCommandDelimeter_";const r=`${e}<<${t}${l.EOL}${a}${l.EOL}${t}`;n.issueCommand("ENV",r)}else{o.issueCommand("set-env",{name:e},a)}}t.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){n.issueCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!a){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return a}return a.trim()}t.getInput=getInput;function getMultilineInput(e,t){const a=getInput(e,t).split("\n").filter((e=>e!==""));ret
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,a;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;a=t.prototype;if(isObject(a)===false)return false;if(a.hasOwnProperty("isPrototypeOf")===false){return false}return true}t.isPlainObject=isPlainObject},9417:e=>{"use strict";e.exports=balanced;function balanced(e,t,a){if(e instanceof RegExp)e=maybeMatch(e,a);if(t instanceof RegExp)t=maybeMatch(t,a);var r=range(e,t,a);return r&&{start:r[0],end:r[1],pre:a.slice(0,r[0]),body:a.slice(r[0]+e.length,r[1]),post:a.slice(r[1]+t.length)}}function maybeMatch(e,t){var a=t.match(e);return a?a[0]:null}balanced.range=range;function range(e,t,a){var r,i,p,s,o;var n=a.indexOf(e);var d=a.indexOf(t,n+1);var l=n;if(n>=0&&d>0){if(e===t){return[n,d]}r=[];p=a.length;while(l>=0&&!o){if(l==n){r.push(l);n=a.indexOf(e,l+1)}else if(r.length==1){o=[r.pop(),d]}else{i=r.pop();if(i<p){p=i;s=d}d=a.indexOf(t,l+1)}l=n<d&&n>=0?n:d}if(r.length){o=[p,s]}}return o}},3682:(e,t,a)=>{var r=a(4670);var i=a(5549);var p=a(6819);var s=Function.bind;var o=s.bind(s);function bindApi(e,t,a){var r=o(p,null).apply(null,a?[t,a]:[t]);e.api={remove:r};e.remove=r;["before","error","after","wrap"].forEach((function(r){var p=a?[t,r,a]:[t,r];e[r]=e.api[r]=o(i,null).apply(null,p)}))}function HookSingular(){var e="h";var t={registry:{}};var a=r.bind(null,t,e);bindApi(a,t,e);return a}function HookCollection(){var e={registry:{}};var t=r.bind(null,e);bindApi(t,e);return t}var n=false;function Hook(){if(!n){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');n=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},5549:e=>{e.exports=addHook;function addHook(e,t,a,r){var i=r;if(!e.registry[a]){e.registry[a]=[]}if(t==="before"){r=function(e,t){return Promise.resolve().then(i.bind(null,t)).then(e.bind(null,t))}}if(t==="after"){r=function(e,t){var a;return Promise.resolve().then(e.bind(null,t)).then((function(e){a=e;return i(a,t)})).then((function(){return a}))}}if(t==="error"){r=function(e,t){return Promise.resolve().then(e.bind(null,t)).catch((function(e){return i(e,t)}))}}e.registry[a].push({hook:r,orig:i})}},4670:e=>{e.exports=register;function register(e,t,a,r){if(typeof a!=="function"){throw new Error("method for before hook must be a function")}if(!r){r={}}if(Array.isArray(t)){return t.reverse().reduce((function(t,a){return register.bind(null,e,a,t,r)}),a)()}return Promise.resolve().then((function(){if(!e.registry[t]){return a(r)}return e.registry[t].reduce((function(e,t){return t.hook.bind(null,e,r)}),a)()}))}},6819:e=>{e.exports=removeHook;function removeHook(e,t,a){if(!e.registry[t]){return}var r=e.registry[t].map((function(e){return e.orig})).indexOf(a);if(r===-1){return}e.registry[t].splice(r,1)}},3717:(e,t,a)=>{var r=a(6891);var i=a(9417);e.exports=expandTop;var p="\0SLASH"+Math.random()+"\0";var s="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var n="\0COMMA"+Math.random()+"\0";var d="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(p).split("\\{").join(s).split("\\}").join(o).split("\\,").join(n).split("\\.").join(d)}function unescapeBraces(e){return e.split(p).join("\\").split(s).join("{").split(o).join("}").split(n).join(",").split(d).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var a=i("{","}",e);if(!a)return e.split(",");var r=a.pre;var p=a.body;var s=a.post;var o=r.split(",");o[o.length-1]+="{"+p+"}";var n=parseCommaParts(s);if(s.length){o[o.length-1]+=n.shift();o.push.apply(o,n)}t.push.apply(t,o);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,a;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;a=t.prototype;if(isObject(a)===false)return false;if(a.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},7129:(e,t,a)=>{"use strict";const r=a(665);const i=Symbol("max");const p=Symbol("length");const s=Symbol("lengthCalculator");const o=Symbol("allowStale");const n=Symbol("maxAge");const d=Symbol("dispose");const l=Symbol("noDisposeOnSet");const u=Symbol("lruList");const m=Symbol("cache");const c=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const a=e.length||naiveLength;this[s]=typeof a!=="function"?naiveLength:a;this[o]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[n]=e.maxAge||0;this[d]=e.dispose;this[l]=e.noDisposeOnSet||false;this[c]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;trim(this)}get max(){return this[i]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[n]=e;trim(this)}get maxAge(){return this[n]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[s]){this[s]=e;this[p]=0;this[u].forEach((e=>{e.length=this[s](e.value,e.key);this[p]+=e.length}))}trim(this)}get lengthCalculator(){return this[s]}get length(){return this[p]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let a=this[u].tail;a!==null;){const r=a.prev;forEachStep(this,e,a,t);a=r}}forEach(e,t){t=t||this;for(let a=this[u].head;a!==null;){const r=a.next;forEachStep(this,e,a,t);a=r}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){if(this[d]&&this[u]&&this[u].length){this[u].forEach((e=>this[d](e.key,e.value)))}this[m]=new Map;this[u]=new r;this[p]=0}dump(){return this[u].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,a){a=a||this[n];if(a&&typeof a!=="number")throw new TypeError("maxAge must be a number");const r=a?Date.now():0;const o=this[s](t,e);if(this[m].has(e)){if(o>this[i]){del(this,this[m].get(e));return false}const s=this[m].get(e);const n=s.value;if(this[d]){if(!this[l])this[d](e,n.value)}n.now=r;n.maxAge=a;n.value=t;this[p]+=o-n.length;n.length=o;this.get(e);trim(this);return true}const c=new Entry(e,t,o,r,a);if(c.length>this[i]){if(this[d])this[d](e,t);return false}this[p]+=c.length;this[u].unshift(c);this[m].set(e,this[u].head);trim(this);return true}has(e){if(!this[m].has(e))return false;const t=this[m].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[u].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[m].get(e))}load(e){this.reset();const t=Date.now();for(let a=e.length-1;a>=0;a--){const r=e[a];const i=r.e||0;if(i===0)this.set(r.k,r.v);else{const e=i-t;if(e>0){this.set(r.k,r.v,e)}}}}prune(){this[m].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,a)=>{const r=e[m].get(t);if(r){const t=r.value;if(isStale(e,t)){del(e,r);if(!e[o])return undefined}else{if(a){if(e[c])r.value.now=Date.now();e[u].unshiftNode(r)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[n])return false;const a=Date.now()-t.now;return t.maxAge?a>t.maxAge:e[n]&&a>e[n]};const trim=e=>{if(e[p]>e[i]){for(let t=e[u].tail;e[p]>e[i]&&t!==null;){const a=t.prev;del(e,t);t=a}}};const del=(e,t)=>{if(t){const a=t.value;if(e[d])e[d](a.key,a.value);e[p]-=a.length;e[m].delete(a.key);e[u].removeNode(t)}};class Entry{constructor(e,t,a,r,i){this.key=e;this.value=t;this.length=a;thi
/*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*/
const r=a(7147);const i=a(2037);const p=a(1017);const s=a(6113);const o={fs:r.constants,os:i.constants};const n=a(4959);const d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,u=3,m=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),c=i.platform()==="win32",h=o.EBADF||o.os.errno.EBADF,v=o.ENOENT||o.os.errno.ENOENT,g=448,_=384,w="exit",y=[],b=r.rmdirSync.bind(r),E=n.sync;let S=false;function tmpName(e,t){const a=_parseArguments(e,t),i=a[0],p=a[1];try{_assertAndSanitizeOptions(i)}catch(e){return p(e)}let s=i.tries;(function _getUniqueName(){try{const e=_generateTmpName(i);r.stat(e,(function(t){if(!t){if(s-- >0)return _getUniqueName();return p(new Error("Could not get a unique tmp filename, max tries reached "+e))}p(null,e)}))}catch(e){p(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),a=t[0];_assertAndSanitizeOptions(a);let i=a.tries;do{const e=_generateTmpName(a);try{r.statSync(e)}catch(t){return e}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const a=_parseArguments(e,t),i=a[0],p=a[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return p(e);r.open(t,m,i.mode||_,(function _fileCreated(e,a){if(e)return p(e);if(i.discardDescriptor){return r.close(a,(function _discardCallback(e){return p(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,i,false))}))}else{const e=i.discardDescriptor||i.detachDescriptor;p(null,t,a,_prepareTmpFileRemoveCallback(t,e?-1:a,i,false))}}))}))}function fileSync(e){const t=_parseArguments(e),a=t[0];const i=a.discardDescriptor||a.detachDescriptor;const p=tmpNameSync(a);var s=r.openSync(p,m,a.mode||_);if(a.discardDescriptor){r.closeSync(s);s=undefined}return{name:p,fd:s,removeCallback:_prepareTmpFileRemoveCallback(p,i?-1:s,a,true)}}function dir(e,t){const a=_parseArguments(e,t),i=a[0],p=a[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return p(e);r.mkdir(t,i.mode||g,(function _dirCreated(e){if(e)return p(e);p(null,t,_prepareTmpDirRemoveCallback(t,i,false))}))}))}function dirSync(e){const t=_parseArguments(e),a=t[0];const i=tmpNameSync(a);r.mkdirSync(i,a.mode||g);return{name:i,removeCallback:_prepareTmpDirRemoveCallback(i,a,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])r.close(e[0],(function(){r.unlink(e[1],_handler)}));else r.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])r.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{r.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,a,r){const i=_prepareRemoveCallback(_removeFileSync,[t,e],r);const p=_prepareRemoveCallback(_removeFileAsync,[t,e],r,i);if(!a.keep)y.unshift(i);return r?i:p}function _prepareTmpDirRemoveCallback(e,t,a){const i=t.unsafeCleanup?n:r.rmdir.bind(r);const p=t.unsafeCleanup?E:b;const s=_prepareRemoveCallback(p,e,a);const o=_prepareRemoveCallback(i,e,a,s);if(!t.keep)y.unshift(s);return a?s:o}function _prepareRemoveCallback(e,t,a,r){let i=false;return function _cleanupCallback(p){if(!i){const s=r||_cleanupCallback;const o=y.indexOf(s);if(o>=0)y.splice(o,1);i=true;if(a||e===b||e===E){return e(t)}else{return e(t,p||function(){})}}}}function _garbageCollector(){if(!S)return;while(y.length){try{y[0]()}catch(e){}}}function _randomChars(e){let t=[],a=null;try{a=s.randomBytes(e)}catch(t){a=s.pseudoRandomBytes(e)}for(var r=0;r<e;r++){t.push(d[a[r]%d.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const a={};for(const t of Object.getOwnPropertyNames(e)){a[t]=e[t]}return[a,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return p.join(t,e.dir,e.name);if(!_isUndefined(e.template))return p.join(t,e.dir,e.template).replace(l,_randomChars(6));const a=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.po
//# sourceMappingURL=index.js.map