Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: allowlist/specify files to check #117

Open
MPV opened this issue Oct 11, 2023 · 1 comment
Open

Improvement: allowlist/specify files to check #117

MPV opened this issue Oct 11, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@MPV
Copy link

MPV commented Oct 11, 2023

Imagine if one has a "matrix" job which runs different checks for each workflow/action in your repository. Then it would be nice being able to use this action in a way where we pass/specify the exact path to the file(s) to check.

In the current implementation you're not allowed to pass your own glob string (path+file):

const workflowsPath = process.env['ZG_WORKFLOWS_PATH'] || '.github/workflows';
const globber = await glob.create([workflowsPath + '/*.yaml', workflowsPath + '/*.yml'].join('\n'));

There is the ZG_WORKFLOWS_PATH override, but how does one use it?

Also, there's still a hardcoded *.ya?ml glob, which disallows picking a specific file one-by-one.

@MPV
Copy link
Author

MPV commented Oct 11, 2023

For inspiration, see the RegEx that Renovate uses for finding GHA files:

{
  "fileMatch": [
    "^(workflow-templates|\\.(?:github|gitea|forgejo)/workflows)/[^/]+\\.ya?ml$",
    "(^|/)action\\.ya?ml$"
  ]
}

@zgosalvez zgosalvez added the help wanted Extra attention is needed label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants