Merge pull request #60 from immutable-actions/ddivad195/misc-cleanup
remove path input
This commit is contained in:
+11
-11
@@ -73,7 +73,7 @@ describe('run', () => {
|
|||||||
process.env.GITHUB_REPOSITORY = ''
|
process.env.GITHUB_REPOSITORY = ''
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('directory1 directory2')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Could not find Repository.')
|
expect(setFailedMock).toHaveBeenCalledWith('Could not find Repository.')
|
||||||
@@ -85,7 +85,7 @@ describe('run', () => {
|
|||||||
process.env.TOKEN = ''
|
process.env.TOKEN = ''
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('directory1 directory2')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Could not find GITHUB_TOKEN.')
|
expect(setFailedMock).toHaveBeenCalledWith('Could not find GITHUB_TOKEN.')
|
||||||
@@ -98,7 +98,7 @@ describe('run', () => {
|
|||||||
process.env.GITHUB_SHA = ''
|
process.env.GITHUB_SHA = ''
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Could not find source commit.')
|
expect(setFailedMock).toHaveBeenCalledWith('Could not find source commit.')
|
||||||
@@ -127,7 +127,7 @@ describe('run', () => {
|
|||||||
github.context.eventName = 'push'
|
github.context.eventName = 'push'
|
||||||
github.context.ref = 'refs/heads/main' // This is a branch, not a tag
|
github.context.ref = 'refs/heads/main' // This is a branch, not a tag
|
||||||
|
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
expect(setFailedMock).toHaveBeenCalledWith(
|
expect(setFailedMock).toHaveBeenCalledWith(
|
||||||
'This action can only be triggered by release events or tag push events.'
|
'This action can only be triggered by release events or tag push events.'
|
||||||
@@ -150,7 +150,7 @@ describe('run', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await main.run('')
|
await main.run()
|
||||||
expect(setFailedMock).toHaveBeenCalledWith(
|
expect(setFailedMock).toHaveBeenCalledWith(
|
||||||
`${tag} is not a valid semantic version, and so cannot be uploaded as an Immutable Action.`
|
`${tag} is not a valid semantic version, and so cannot be uploaded as an Immutable Action.`
|
||||||
)
|
)
|
||||||
@@ -175,7 +175,7 @@ describe('run', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
||||||
@@ -199,7 +199,7 @@ describe('run', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
||||||
@@ -223,7 +223,7 @@ describe('run', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
||||||
@@ -265,7 +265,7 @@ describe('run', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
||||||
@@ -311,7 +311,7 @@ describe('run', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
expect(setFailedMock).toHaveBeenCalledWith('Something went wrong')
|
||||||
@@ -362,7 +362,7 @@ describe('run', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Run the action
|
// Run the action
|
||||||
await main.run('')
|
await main.run()
|
||||||
|
|
||||||
// Check the results
|
// Check the results
|
||||||
expect(publishOCIArtifactMock).toHaveBeenCalledTimes(1)
|
expect(publishOCIArtifactMock).toHaveBeenCalledTimes(1)
|
||||||
|
|||||||
+2
-12
@@ -1,22 +1,11 @@
|
|||||||
name: 'Package and Publish'
|
name: 'Package and Publish'
|
||||||
description: 'Publish actions as OCI artifacts to GHCR'
|
description: 'Publish actions as OCI artifacts to GHCR'
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
# TODO: Add your action's branding here. This will appear on the GitHub Marketplace.
|
# TODO: Add your action's branding here. This will appear on the GitHub Marketplace.
|
||||||
branding:
|
branding:
|
||||||
icon: 'heart'
|
icon: 'heart'
|
||||||
color: 'red'
|
color: 'red'
|
||||||
|
|
||||||
inputs:
|
|
||||||
path:
|
|
||||||
required: false
|
|
||||||
description: The work directory or path to be tar archived and uploaded as OCI Artifact layer.
|
|
||||||
default: '.'
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
package-url:
|
package-url:
|
||||||
description: 'The name of package published to GHCR along with semver. For example, https://ghcr.io/actions/package-action:1.0.1'
|
description: 'The name of package published to GHCR along with semver. For example, https://ghcr.io/actions/package-action:1.0.1'
|
||||||
@@ -27,11 +16,12 @@ outputs:
|
|||||||
package-manifest-sha:
|
package-manifest-sha:
|
||||||
description: 'A sha256 hash of the package manifest'
|
description: 'A sha256 hash of the package manifest'
|
||||||
value: ${{steps.publish.outputs.package-manifest-sha}}
|
value: ${{steps.publish.outputs.package-manifest-sha}}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- name: Publish Action Package
|
- name: Publish Action Package
|
||||||
run: 'node ${{github.action_path}}/dist/index.js --path ${{ inputs.path }}'
|
run: 'node ${{github.action_path}}/dist/index.js'
|
||||||
shell: bash
|
shell: bash
|
||||||
id: publish
|
id: publish
|
||||||
env:
|
env:
|
||||||
|
|||||||
+18
-300
@@ -33737,277 +33737,6 @@ function populateMaps (extensions, types) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 35871:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
function hasKey(obj, keys) {
|
|
||||||
var o = obj;
|
|
||||||
keys.slice(0, -1).forEach(function (key) {
|
|
||||||
o = o[key] || {};
|
|
||||||
});
|
|
||||||
|
|
||||||
var key = keys[keys.length - 1];
|
|
||||||
return key in o;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isNumber(x) {
|
|
||||||
if (typeof x === 'number') { return true; }
|
|
||||||
if ((/^0x[0-9a-f]+$/i).test(x)) { return true; }
|
|
||||||
return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isConstructorOrProto(obj, key) {
|
|
||||||
return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__';
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = function (args, opts) {
|
|
||||||
if (!opts) { opts = {}; }
|
|
||||||
|
|
||||||
var flags = {
|
|
||||||
bools: {},
|
|
||||||
strings: {},
|
|
||||||
unknownFn: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (typeof opts.unknown === 'function') {
|
|
||||||
flags.unknownFn = opts.unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof opts.boolean === 'boolean' && opts.boolean) {
|
|
||||||
flags.allBools = true;
|
|
||||||
} else {
|
|
||||||
[].concat(opts.boolean).filter(Boolean).forEach(function (key) {
|
|
||||||
flags.bools[key] = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var aliases = {};
|
|
||||||
|
|
||||||
function aliasIsBoolean(key) {
|
|
||||||
return aliases[key].some(function (x) {
|
|
||||||
return flags.bools[x];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.keys(opts.alias || {}).forEach(function (key) {
|
|
||||||
aliases[key] = [].concat(opts.alias[key]);
|
|
||||||
aliases[key].forEach(function (x) {
|
|
||||||
aliases[x] = [key].concat(aliases[key].filter(function (y) {
|
|
||||||
return x !== y;
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
[].concat(opts.string).filter(Boolean).forEach(function (key) {
|
|
||||||
flags.strings[key] = true;
|
|
||||||
if (aliases[key]) {
|
|
||||||
[].concat(aliases[key]).forEach(function (k) {
|
|
||||||
flags.strings[k] = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var defaults = opts.default || {};
|
|
||||||
|
|
||||||
var argv = { _: [] };
|
|
||||||
|
|
||||||
function argDefined(key, arg) {
|
|
||||||
return (flags.allBools && (/^--[^=]+$/).test(arg))
|
|
||||||
|| flags.strings[key]
|
|
||||||
|| flags.bools[key]
|
|
||||||
|| aliases[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
function setKey(obj, keys, value) {
|
|
||||||
var o = obj;
|
|
||||||
for (var i = 0; i < keys.length - 1; i++) {
|
|
||||||
var key = keys[i];
|
|
||||||
if (isConstructorOrProto(o, key)) { return; }
|
|
||||||
if (o[key] === undefined) { o[key] = {}; }
|
|
||||||
if (
|
|
||||||
o[key] === Object.prototype
|
|
||||||
|| o[key] === Number.prototype
|
|
||||||
|| o[key] === String.prototype
|
|
||||||
) {
|
|
||||||
o[key] = {};
|
|
||||||
}
|
|
||||||
if (o[key] === Array.prototype) { o[key] = []; }
|
|
||||||
o = o[key];
|
|
||||||
}
|
|
||||||
|
|
||||||
var lastKey = keys[keys.length - 1];
|
|
||||||
if (isConstructorOrProto(o, lastKey)) { return; }
|
|
||||||
if (
|
|
||||||
o === Object.prototype
|
|
||||||
|| o === Number.prototype
|
|
||||||
|| o === String.prototype
|
|
||||||
) {
|
|
||||||
o = {};
|
|
||||||
}
|
|
||||||
if (o === Array.prototype) { o = []; }
|
|
||||||
if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') {
|
|
||||||
o[lastKey] = value;
|
|
||||||
} else if (Array.isArray(o[lastKey])) {
|
|
||||||
o[lastKey].push(value);
|
|
||||||
} else {
|
|
||||||
o[lastKey] = [o[lastKey], value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function setArg(key, val, arg) {
|
|
||||||
if (arg && flags.unknownFn && !argDefined(key, arg)) {
|
|
||||||
if (flags.unknownFn(arg) === false) { return; }
|
|
||||||
}
|
|
||||||
|
|
||||||
var value = !flags.strings[key] && isNumber(val)
|
|
||||||
? Number(val)
|
|
||||||
: val;
|
|
||||||
setKey(argv, key.split('.'), value);
|
|
||||||
|
|
||||||
(aliases[key] || []).forEach(function (x) {
|
|
||||||
setKey(argv, x.split('.'), value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.keys(flags.bools).forEach(function (key) {
|
|
||||||
setArg(key, defaults[key] === undefined ? false : defaults[key]);
|
|
||||||
});
|
|
||||||
|
|
||||||
var notFlags = [];
|
|
||||||
|
|
||||||
if (args.indexOf('--') !== -1) {
|
|
||||||
notFlags = args.slice(args.indexOf('--') + 1);
|
|
||||||
args = args.slice(0, args.indexOf('--'));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < args.length; i++) {
|
|
||||||
var arg = args[i];
|
|
||||||
var key;
|
|
||||||
var next;
|
|
||||||
|
|
||||||
if ((/^--.+=/).test(arg)) {
|
|
||||||
// Using [\s\S] instead of . because js doesn't support the
|
|
||||||
// 'dotall' regex modifier. See:
|
|
||||||
// http://stackoverflow.com/a/1068308/13216
|
|
||||||
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
||||||
key = m[1];
|
|
||||||
var value = m[2];
|
|
||||||
if (flags.bools[key]) {
|
|
||||||
value = value !== 'false';
|
|
||||||
}
|
|
||||||
setArg(key, value, arg);
|
|
||||||
} else if ((/^--no-.+/).test(arg)) {
|
|
||||||
key = arg.match(/^--no-(.+)/)[1];
|
|
||||||
setArg(key, false, arg);
|
|
||||||
} else if ((/^--.+/).test(arg)) {
|
|
||||||
key = arg.match(/^--(.+)/)[1];
|
|
||||||
next = args[i + 1];
|
|
||||||
if (
|
|
||||||
next !== undefined
|
|
||||||
&& !(/^(-|--)[^-]/).test(next)
|
|
||||||
&& !flags.bools[key]
|
|
||||||
&& !flags.allBools
|
|
||||||
&& (aliases[key] ? !aliasIsBoolean(key) : true)
|
|
||||||
) {
|
|
||||||
setArg(key, next, arg);
|
|
||||||
i += 1;
|
|
||||||
} else if ((/^(true|false)$/).test(next)) {
|
|
||||||
setArg(key, next === 'true', arg);
|
|
||||||
i += 1;
|
|
||||||
} else {
|
|
||||||
setArg(key, flags.strings[key] ? '' : true, arg);
|
|
||||||
}
|
|
||||||
} else if ((/^-[^-]+/).test(arg)) {
|
|
||||||
var letters = arg.slice(1, -1).split('');
|
|
||||||
|
|
||||||
var broken = false;
|
|
||||||
for (var j = 0; j < letters.length; j++) {
|
|
||||||
next = arg.slice(j + 2);
|
|
||||||
|
|
||||||
if (next === '-') {
|
|
||||||
setArg(letters[j], next, arg);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') {
|
|
||||||
setArg(letters[j], next.slice(1), arg);
|
|
||||||
broken = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
(/[A-Za-z]/).test(letters[j])
|
|
||||||
&& (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next)
|
|
||||||
) {
|
|
||||||
setArg(letters[j], next, arg);
|
|
||||||
broken = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
||||||
setArg(letters[j], arg.slice(j + 2), arg);
|
|
||||||
broken = true;
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
key = arg.slice(-1)[0];
|
|
||||||
if (!broken && key !== '-') {
|
|
||||||
if (
|
|
||||||
args[i + 1]
|
|
||||||
&& !(/^(-|--)[^-]/).test(args[i + 1])
|
|
||||||
&& !flags.bools[key]
|
|
||||||
&& (aliases[key] ? !aliasIsBoolean(key) : true)
|
|
||||||
) {
|
|
||||||
setArg(key, args[i + 1], arg);
|
|
||||||
i += 1;
|
|
||||||
} else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) {
|
|
||||||
setArg(key, args[i + 1] === 'true', arg);
|
|
||||||
i += 1;
|
|
||||||
} else {
|
|
||||||
setArg(key, flags.strings[key] ? '' : true, arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
|
||||||
argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));
|
|
||||||
}
|
|
||||||
if (opts.stopEarly) {
|
|
||||||
argv._.push.apply(argv._, args.slice(i + 1));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.keys(defaults).forEach(function (k) {
|
|
||||||
if (!hasKey(argv, k.split('.'))) {
|
|
||||||
setKey(argv, k.split('.'), defaults[k]);
|
|
||||||
|
|
||||||
(aliases[k] || []).forEach(function (x) {
|
|
||||||
setKey(argv, x.split('.'), defaults[k]);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (opts['--']) {
|
|
||||||
argv['--'] = notFlags.slice();
|
|
||||||
} else {
|
|
||||||
notFlags.forEach(function (k) {
|
|
||||||
argv._.push(k);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return argv;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 41077:
|
/***/ 41077:
|
||||||
@@ -75019,27 +74748,6 @@ function configureRequestDebugLogging() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 6144:
|
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
/**
|
|
||||||
* The entrypoint for the action.
|
|
||||||
*/
|
|
||||||
const main_1 = __nccwpck_require__(70399);
|
|
||||||
const minimist_1 = __importDefault(__nccwpck_require__(35871));
|
|
||||||
const path = (0, minimist_1.default)(process.argv.slice(2)).path || '.';
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
||||||
(0, main_1.run)(path);
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 70399:
|
/***/ 70399:
|
||||||
@@ -75086,7 +74794,7 @@ const semver_1 = __importDefault(__nccwpck_require__(11383));
|
|||||||
* The main function for the action.
|
* The main function for the action.
|
||||||
* @returns {Promise<void>} Resolves when the action is complete.
|
* @returns {Promise<void>} Resolves when the action is complete.
|
||||||
*/
|
*/
|
||||||
async function run(pathInput) {
|
async function run() {
|
||||||
const tmpDirs = [];
|
const tmpDirs = [];
|
||||||
try {
|
try {
|
||||||
const repository = process.env.GITHUB_REPOSITORY || '';
|
const repository = process.env.GITHUB_REPOSITORY || '';
|
||||||
@@ -79881,12 +79589,22 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
|
|||||||
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
||||||
/******/
|
/******/
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/
|
var __webpack_exports__ = {};
|
||||||
/******/ // startup
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||||
/******/ // Load entry module and return exports
|
(() => {
|
||||||
/******/ // This entry module is referenced by other modules so it can't be inlined
|
"use strict";
|
||||||
/******/ var __webpack_exports__ = __nccwpck_require__(6144);
|
var exports = __webpack_exports__;
|
||||||
/******/ module.exports = __webpack_exports__;
|
|
||||||
/******/
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
/**
|
||||||
|
* The entrypoint for the action.
|
||||||
|
*/
|
||||||
|
const main_1 = __nccwpck_require__(70399);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
|
(0, main_1.run)();
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
module.exports = __webpack_exports__;
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
-22
@@ -1528,28 +1528,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
minimist
|
|
||||||
MIT
|
|
||||||
This software is released under the MIT license:
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
||||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
minipass
|
minipass
|
||||||
ISC
|
ISC
|
||||||
The ISC License
|
The ISC License
|
||||||
|
|||||||
Generated
+1
-1
@@ -17,7 +17,6 @@
|
|||||||
"axios": "^1.6.2",
|
"axios": "^1.6.2",
|
||||||
"axios-debug-log": "^1.0.0",
|
"axios-debug-log": "^1.0.0",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"minimist": "^1.2.8",
|
|
||||||
"tar": "^6.2.0"
|
"tar": "^6.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -6165,6 +6164,7 @@
|
|||||||
"version": "1.2.8",
|
"version": "1.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||||
|
"dev": true,
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,6 @@
|
|||||||
"axios": "^1.6.2",
|
"axios": "^1.6.2",
|
||||||
"axios-debug-log": "^1.0.0",
|
"axios-debug-log": "^1.0.0",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"minimist": "^1.2.8",
|
|
||||||
"tar": "^6.2.0"
|
"tar": "^6.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
+1
-3
@@ -2,8 +2,6 @@
|
|||||||
* The entrypoint for the action.
|
* The entrypoint for the action.
|
||||||
*/
|
*/
|
||||||
import { run } from './main'
|
import { run } from './main'
|
||||||
import minimist from 'minimist'
|
|
||||||
|
|
||||||
const path = minimist(process.argv.slice(2)).path || '.'
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
run(path)
|
run()
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import semver from 'semver'
|
|||||||
* The main function for the action.
|
* The main function for the action.
|
||||||
* @returns {Promise<void>} Resolves when the action is complete.
|
* @returns {Promise<void>} Resolves when the action is complete.
|
||||||
*/
|
*/
|
||||||
export async function run(pathInput: string): Promise<void> {
|
export async function run(): Promise<void> {
|
||||||
const tmpDirs: string[] = []
|
const tmpDirs: string[] = []
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user