Skip to content

Commit 1c3a928

Browse files
committed
add new field
1 parent ce1afb5 commit 1c3a928

4 files changed

Lines changed: 43 additions & 28 deletions

File tree

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ inputs:
1919
Startup options for MATLAB
2020
required: false
2121
default: ""
22+
generate-job-summary:
23+
description: >-
24+
Whether to generate a MATLAB-related job summary for the workflow run
25+
required: false
26+
default: true
2227
runs:
2328
using: node24
2429
main: dist/index.js

package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dependencies": {
2323
"@actions/core": "^3.0.0",
2424
"@actions/exec": "^3.0.0",
25-
"common-utils": "github:matlab-actions/common-utils#v2.2.2"
25+
"common-utils": "github:matlab-actions/common-utils#v2.3.0"
2626
},
2727
"devDependencies": {
2828
"@types/jest": "^30.0.0",

src/index.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ async function run() {
2020

2121
const command = buildtool.generateCommand(options);
2222
const startupOptions = core.getInput("startup-options").split(" ");
23+
const generateJobSummary = core.getBooleanInput("generate-job-summary");
2324

2425
const helperScript = await matlab.generateScript(workspaceDir, command);
2526
const execOptions = {
2627
env: {
2728
...process.env,
2829
MW_BATCH_LICENSING_ONLINE: "true", // Remove when online batch licensing is the default
2930
MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE: "buildframework.getDefaultPlugins",
31+
MW_GENERATE_JOB_SUMMARY: String(generateJobSummary),
3032
},
3133
};
3234

@@ -39,12 +41,20 @@ async function run() {
3941
startupOptions,
4042
)
4143
.finally(() => {
42-
const runnerTemp = process.env.RUNNER_TEMP || "";
43-
const runId = process.env.GITHUB_RUN_ID || "";
44-
45-
buildSummary.processAndAddBuildSummary(runnerTemp, runId);
46-
testResultsSummary.processAndAddTestSummary(runnerTemp, runId, workspaceDir);
47-
core.summary.write();
44+
if (generateJobSummary) {
45+
const runnerTemp = process.env.RUNNER_TEMP || "";
46+
const runId = process.env.GITHUB_RUN_ID || "";
47+
const actionName = process.env.GITHUB_ACTION || "";
48+
49+
buildSummary.processAndAddBuildSummary(runnerTemp, actionName);
50+
testResultsSummary.processAndAddTestSummary(
51+
runnerTemp,
52+
runId,
53+
actionName,
54+
workspaceDir,
55+
);
56+
core.summary.write();
57+
}
4858
});
4959
}
5060

0 commit comments

Comments
 (0)