mirror of
https://github.com/papeloto/action-zip
synced 2024-11-22 05:29:35 -08:00
chore: print files
This commit is contained in:
parent
a136662816
commit
d303734f9e
2 changed files with 10 additions and 2 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -61,12 +61,16 @@ const core = __webpack_require__(470);
|
||||||
const inputFiles = core.getInput("files", { required: true });
|
const inputFiles = core.getInput("files", { required: true });
|
||||||
const filename = core.getInput("filename");
|
const filename = core.getInput("filename");
|
||||||
|
|
||||||
const files = inputFiles.split(" ");
|
const files = inputFiles
|
||||||
|
.split(" ")
|
||||||
|
.map(file => path.join(process.env.GITHUB_WORKSPACE, file));
|
||||||
|
|
||||||
console.log(`Ready to zip "${inputFiles}" into ${filename}`);
|
console.log(`Ready to zip "${inputFiles}" into ${filename}`);
|
||||||
|
|
||||||
const zip = new AdmZip();
|
const zip = new AdmZip();
|
||||||
|
|
||||||
|
console.log(files);
|
||||||
|
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
if (!fs.existsSync(file)) {
|
if (!fs.existsSync(file)) {
|
||||||
console.log(` - ${file} (Not Found)`);
|
console.log(` - ${file} (Not Found)`);
|
||||||
|
|
6
index.js
6
index.js
|
@ -6,12 +6,16 @@ const core = require("@actions/core");
|
||||||
const inputFiles = core.getInput("files", { required: true });
|
const inputFiles = core.getInput("files", { required: true });
|
||||||
const filename = core.getInput("filename");
|
const filename = core.getInput("filename");
|
||||||
|
|
||||||
const files = inputFiles.split(" ");
|
const files = inputFiles
|
||||||
|
.split(" ")
|
||||||
|
.map(file => path.join(process.env.GITHUB_WORKSPACE, file));
|
||||||
|
|
||||||
console.log(`Ready to zip "${inputFiles}" into ${filename}`);
|
console.log(`Ready to zip "${inputFiles}" into ${filename}`);
|
||||||
|
|
||||||
const zip = new AdmZip();
|
const zip = new AdmZip();
|
||||||
|
|
||||||
|
console.log(files);
|
||||||
|
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
if (!fs.existsSync(file)) {
|
if (!fs.existsSync(file)) {
|
||||||
console.log(` - ${file} (Not Found)`);
|
console.log(` - ${file} (Not Found)`);
|
||||||
|
|
Loading…
Reference in a new issue