mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-25 13:26:19 +08:00
Build outputs
This commit is contained in:
parent
c3bdce8205
commit
bfa3c0508e
38
dist/main/index.js
vendored
38
dist/main/index.js
vendored
@ -70674,13 +70674,19 @@ const artifact = __importStar(__nccwpck_require__(2605));
|
|||||||
const github = __importStar(__nccwpck_require__(5438));
|
const github = __importStar(__nccwpck_require__(5438));
|
||||||
const glob = __importStar(__nccwpck_require__(8090));
|
const glob = __importStar(__nccwpck_require__(8090));
|
||||||
const toolCache = __importStar(__nccwpck_require__(7784));
|
const toolCache = __importStar(__nccwpck_require__(7784));
|
||||||
|
const request_error_1 = __nccwpck_require__(537);
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const layout = __importStar(__nccwpck_require__(8182));
|
const layout = __importStar(__nccwpck_require__(8182));
|
||||||
const input_params_1 = __nccwpck_require__(3885);
|
const input_params_1 = __nccwpck_require__(3885);
|
||||||
const DEPENDENCY_GRAPH_ARTIFACT = 'dependency-graph';
|
const DEPENDENCY_GRAPH_ARTIFACT = 'dependency-graph';
|
||||||
function setup(option) {
|
function setup(option) {
|
||||||
if (option === input_params_1.DependencyGraphOption.Disabled || option === input_params_1.DependencyGraphOption.DownloadAndSubmit) {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (option === input_params_1.DependencyGraphOption.Disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (option === input_params_1.DependencyGraphOption.DownloadAndSubmit) {
|
||||||
|
yield downloadAndSubmitDependencyGraphs();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info('Enabling dependency graph generation');
|
core.info('Enabling dependency graph generation');
|
||||||
@ -70691,12 +70697,14 @@ function setup(option) {
|
|||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', layout.workspaceDirectory());
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', layout.workspaceDirectory());
|
||||||
core.exportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
core.exportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
exports.setup = setup;
|
exports.setup = setup;
|
||||||
function complete(option) {
|
function complete(option) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case input_params_1.DependencyGraphOption.Disabled:
|
case input_params_1.DependencyGraphOption.Disabled:
|
||||||
|
case input_params_1.DependencyGraphOption.DownloadAndSubmit:
|
||||||
return;
|
return;
|
||||||
case input_params_1.DependencyGraphOption.Generate:
|
case input_params_1.DependencyGraphOption.Generate:
|
||||||
yield uploadDependencyGraphs();
|
yield uploadDependencyGraphs();
|
||||||
@ -70704,8 +70712,6 @@ function complete(option) {
|
|||||||
case input_params_1.DependencyGraphOption.GenerateAndSubmit:
|
case input_params_1.DependencyGraphOption.GenerateAndSubmit:
|
||||||
yield submitDependencyGraphs(yield uploadDependencyGraphs());
|
yield submitDependencyGraphs(yield uploadDependencyGraphs());
|
||||||
return;
|
return;
|
||||||
case input_params_1.DependencyGraphOption.DownloadAndSubmit:
|
|
||||||
yield downloadAndSubmitDependencyGraphs();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -70729,8 +70735,27 @@ function downloadAndSubmitDependencyGraphs() {
|
|||||||
}
|
}
|
||||||
function submitDependencyGraphs(dependencyGraphFiles) {
|
function submitDependencyGraphs(dependencyGraphFiles) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const octokit = getOctokit();
|
|
||||||
for (const jsonFile of dependencyGraphFiles) {
|
for (const jsonFile of dependencyGraphFiles) {
|
||||||
|
try {
|
||||||
|
yield submitDependencyGraphFile(jsonFile);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
if (error instanceof request_error_1.RequestError) {
|
||||||
|
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
||||||
|
core.warning(`Failed to submit dependency graph ${relativeJsonFile}.\n` +
|
||||||
|
"Please ensure that the 'contents: write' permission is available for the workflow job.\n" +
|
||||||
|
"Note that this permission is never available for a 'pull_request' trigger from a repository fork.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function submitDependencyGraphFile(jsonFile) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const octokit = getOctokit();
|
||||||
const jsonContent = fs_1.default.readFileSync(jsonFile, 'utf8');
|
const jsonContent = fs_1.default.readFileSync(jsonFile, 'utf8');
|
||||||
const jsonObject = JSON.parse(jsonContent);
|
const jsonObject = JSON.parse(jsonContent);
|
||||||
jsonObject.owner = github.context.repo.owner;
|
jsonObject.owner = github.context.repo.owner;
|
||||||
@ -70738,7 +70763,6 @@ function submitDependencyGraphs(dependencyGraphFiles) {
|
|||||||
const response = yield octokit.request('POST /repos/{owner}/{repo}/dependency-graph/snapshots', jsonObject);
|
const response = yield octokit.request('POST /repos/{owner}/{repo}/dependency-graph/snapshots', jsonObject);
|
||||||
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
||||||
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function retrieveDependencyGraphs(workspaceDirectory) {
|
function retrieveDependencyGraphs(workspaceDirectory) {
|
||||||
@ -71657,7 +71681,7 @@ function setup() {
|
|||||||
const cacheListener = new cache_reporting_1.CacheListener();
|
const cacheListener = new cache_reporting_1.CacheListener();
|
||||||
yield caches.restore(gradleUserHome, cacheListener);
|
yield caches.restore(gradleUserHome, cacheListener);
|
||||||
core.saveState(CACHE_LISTENER, cacheListener.stringify());
|
core.saveState(CACHE_LISTENER, cacheListener.stringify());
|
||||||
dependencyGraph.setup(params.getDependencyGraphOption());
|
yield dependencyGraph.setup(params.getDependencyGraphOption());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.setup = setup;
|
exports.setup = setup;
|
||||||
@ -71679,7 +71703,7 @@ function complete() {
|
|||||||
else {
|
else {
|
||||||
(0, job_summary_1.logJobSummary)(buildResults, cacheListener);
|
(0, job_summary_1.logJobSummary)(buildResults, cacheListener);
|
||||||
}
|
}
|
||||||
dependencyGraph.complete(params.getDependencyGraphOption());
|
yield dependencyGraph.complete(params.getDependencyGraphOption());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.complete = complete;
|
exports.complete = complete;
|
||||||
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
38
dist/post/index.js
vendored
38
dist/post/index.js
vendored
@ -70674,13 +70674,19 @@ const artifact = __importStar(__nccwpck_require__(2605));
|
|||||||
const github = __importStar(__nccwpck_require__(5438));
|
const github = __importStar(__nccwpck_require__(5438));
|
||||||
const glob = __importStar(__nccwpck_require__(8090));
|
const glob = __importStar(__nccwpck_require__(8090));
|
||||||
const toolCache = __importStar(__nccwpck_require__(7784));
|
const toolCache = __importStar(__nccwpck_require__(7784));
|
||||||
|
const request_error_1 = __nccwpck_require__(537);
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const layout = __importStar(__nccwpck_require__(8182));
|
const layout = __importStar(__nccwpck_require__(8182));
|
||||||
const input_params_1 = __nccwpck_require__(3885);
|
const input_params_1 = __nccwpck_require__(3885);
|
||||||
const DEPENDENCY_GRAPH_ARTIFACT = 'dependency-graph';
|
const DEPENDENCY_GRAPH_ARTIFACT = 'dependency-graph';
|
||||||
function setup(option) {
|
function setup(option) {
|
||||||
if (option === input_params_1.DependencyGraphOption.Disabled || option === input_params_1.DependencyGraphOption.DownloadAndSubmit) {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (option === input_params_1.DependencyGraphOption.Disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (option === input_params_1.DependencyGraphOption.DownloadAndSubmit) {
|
||||||
|
yield downloadAndSubmitDependencyGraphs();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info('Enabling dependency graph generation');
|
core.info('Enabling dependency graph generation');
|
||||||
@ -70691,12 +70697,14 @@ function setup(option) {
|
|||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_SHA', getShaFromContext());
|
||||||
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', layout.workspaceDirectory());
|
core.exportVariable('GITHUB_DEPENDENCY_GRAPH_WORKSPACE', layout.workspaceDirectory());
|
||||||
core.exportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
core.exportVariable('DEPENDENCY_GRAPH_REPORT_DIR', path.resolve(layout.workspaceDirectory(), 'dependency-graph-reports'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
exports.setup = setup;
|
exports.setup = setup;
|
||||||
function complete(option) {
|
function complete(option) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case input_params_1.DependencyGraphOption.Disabled:
|
case input_params_1.DependencyGraphOption.Disabled:
|
||||||
|
case input_params_1.DependencyGraphOption.DownloadAndSubmit:
|
||||||
return;
|
return;
|
||||||
case input_params_1.DependencyGraphOption.Generate:
|
case input_params_1.DependencyGraphOption.Generate:
|
||||||
yield uploadDependencyGraphs();
|
yield uploadDependencyGraphs();
|
||||||
@ -70704,8 +70712,6 @@ function complete(option) {
|
|||||||
case input_params_1.DependencyGraphOption.GenerateAndSubmit:
|
case input_params_1.DependencyGraphOption.GenerateAndSubmit:
|
||||||
yield submitDependencyGraphs(yield uploadDependencyGraphs());
|
yield submitDependencyGraphs(yield uploadDependencyGraphs());
|
||||||
return;
|
return;
|
||||||
case input_params_1.DependencyGraphOption.DownloadAndSubmit:
|
|
||||||
yield downloadAndSubmitDependencyGraphs();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -70729,8 +70735,27 @@ function downloadAndSubmitDependencyGraphs() {
|
|||||||
}
|
}
|
||||||
function submitDependencyGraphs(dependencyGraphFiles) {
|
function submitDependencyGraphs(dependencyGraphFiles) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const octokit = getOctokit();
|
|
||||||
for (const jsonFile of dependencyGraphFiles) {
|
for (const jsonFile of dependencyGraphFiles) {
|
||||||
|
try {
|
||||||
|
yield submitDependencyGraphFile(jsonFile);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
if (error instanceof request_error_1.RequestError) {
|
||||||
|
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
||||||
|
core.warning(`Failed to submit dependency graph ${relativeJsonFile}.\n` +
|
||||||
|
"Please ensure that the 'contents: write' permission is available for the workflow job.\n" +
|
||||||
|
"Note that this permission is never available for a 'pull_request' trigger from a repository fork.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function submitDependencyGraphFile(jsonFile) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const octokit = getOctokit();
|
||||||
const jsonContent = fs_1.default.readFileSync(jsonFile, 'utf8');
|
const jsonContent = fs_1.default.readFileSync(jsonFile, 'utf8');
|
||||||
const jsonObject = JSON.parse(jsonContent);
|
const jsonObject = JSON.parse(jsonContent);
|
||||||
jsonObject.owner = github.context.repo.owner;
|
jsonObject.owner = github.context.repo.owner;
|
||||||
@ -70738,7 +70763,6 @@ function submitDependencyGraphs(dependencyGraphFiles) {
|
|||||||
const response = yield octokit.request('POST /repos/{owner}/{repo}/dependency-graph/snapshots', jsonObject);
|
const response = yield octokit.request('POST /repos/{owner}/{repo}/dependency-graph/snapshots', jsonObject);
|
||||||
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
|
||||||
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function retrieveDependencyGraphs(workspaceDirectory) {
|
function retrieveDependencyGraphs(workspaceDirectory) {
|
||||||
@ -71289,7 +71313,7 @@ function setup() {
|
|||||||
const cacheListener = new cache_reporting_1.CacheListener();
|
const cacheListener = new cache_reporting_1.CacheListener();
|
||||||
yield caches.restore(gradleUserHome, cacheListener);
|
yield caches.restore(gradleUserHome, cacheListener);
|
||||||
core.saveState(CACHE_LISTENER, cacheListener.stringify());
|
core.saveState(CACHE_LISTENER, cacheListener.stringify());
|
||||||
dependencyGraph.setup(params.getDependencyGraphOption());
|
yield dependencyGraph.setup(params.getDependencyGraphOption());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.setup = setup;
|
exports.setup = setup;
|
||||||
@ -71311,7 +71335,7 @@ function complete() {
|
|||||||
else {
|
else {
|
||||||
(0, job_summary_1.logJobSummary)(buildResults, cacheListener);
|
(0, job_summary_1.logJobSummary)(buildResults, cacheListener);
|
||||||
}
|
}
|
||||||
dependencyGraph.complete(params.getDependencyGraphOption());
|
yield dependencyGraph.complete(params.getDependencyGraphOption());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.complete = complete;
|
exports.complete = complete;
|
||||||
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user