mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Add more input parameters for dependency-graph generation
- dependency-graph-include-projects - dependency-graph-exclude-projects - dependency-graph include-configurations - dependency-graph-exclude-configurations
This commit is contained in:
@@ -51,6 +51,22 @@ export class DependencyGraphConfig {
|
||||
return process.env['DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME']
|
||||
}
|
||||
|
||||
getExcludeProjects(): string | undefined {
|
||||
return getOptionalInput('dependency-graph-exclude-projects')
|
||||
}
|
||||
|
||||
getIncludeProjects(): string | undefined {
|
||||
return getOptionalInput('dependency-graph-include-projects')
|
||||
}
|
||||
|
||||
getExcludeConfigurations(): string | undefined {
|
||||
return getOptionalInput('dependency-graph-exclude-configurations')
|
||||
}
|
||||
|
||||
getIncludeConfigurations(): string | undefined {
|
||||
return getOptionalInput('dependency-graph-include-configurations')
|
||||
}
|
||||
|
||||
static constructJobCorrelator(workflow: string, jobId: string, matrixJson: string): string {
|
||||
const matrixString = this.describeMatrix(matrixJson)
|
||||
const label = matrixString ? `${workflow}-${jobId}-${matrixString}` : `${workflow}-${jobId}`
|
||||
@@ -372,6 +388,14 @@ export function parseNumericInput(paramName: string, paramValue: string, paramDe
|
||||
return numericValue
|
||||
}
|
||||
|
||||
function getOptionalInput(paramName: string): string | undefined {
|
||||
const paramValue = core.getInput(paramName)
|
||||
if (paramValue.length > 0) {
|
||||
return paramValue
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
function getBooleanInput(paramName: string, paramDefault = false): boolean {
|
||||
const paramValue = core.getInput(paramName)
|
||||
switch (paramValue.toLowerCase().trim()) {
|
||||
|
||||
Reference in New Issue
Block a user