Skip to content

Commit

Permalink
Support glob path
Browse files Browse the repository at this point in the history
  • Loading branch information
Emile-Filteau committed Sep 24, 2024
1 parent ce00c01 commit 000d94a
Show file tree
Hide file tree
Showing 438 changed files with 44,502 additions and 7 deletions.
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const fs = require("fs");
const { globSync } = require("glob");
const yaml = require("js-yaml");
const core = require("@actions/core");

Expand All @@ -7,13 +8,7 @@ const validUsers = (core.getInput("api_users") || process.env.API_USERS || '')
.split(",")
.filter((u) => !!u);

const files = fs.readdirSync(path).filter((f) => f.endsWith(".yaml"));

fs.readdirSync(path)
.filter((f) => f.endsWith(".yml"))
.forEach((file) => {
fail(`Error with file ${file}, replace .yml with .yaml`);
});
const files = globSync([`${path}.{yml,yaml}`]);

files
.map((file) => {
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/glob

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 000d94a

Please sign in to comment.