-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
I know this is designed for a GitHub Actions environment, but I'm curious if we can modify the configuration slightly for other environments.
Today, this plugin will cause a build failure if it's applied without all its expected configuration. I've implemented this as a temporary workaround:
if (System.getenv("GITHUB_WORKSPACE") != null
&& System.getenv("GITHUB_REF") != null
&& System.getenv("GITHUB_SHA") != null
&& System.getenv("GITHUB_JOB") != null
&& System.getenv("GITHUB_RUN_NUMBER") != null) {
apply plugin: GitHubDependencySubmissionPlugin
}But this is fairly annoying to check, and it can get out-of-date. I'd like to propose 2 alternatives if the variables do not have values:
- Inject known placeholders, such as the name of the variable, into the JSON.
- Emit a warning message, don't apply anything, and therefore don't generate the JSON.
Note: I'm willing to PR this but I want to make sure I'm doing what the maintainers would accept.
sschuberth
Metadata
Metadata
Assignees
Labels
No labels