File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 30
30
plugins : ${{ toJSON(matrix.plugins) }}
31
31
version : ${{ needs.get-versions.outputs.version }}
32
32
secrets : inherit
33
+
34
+ summarize :
35
+ needs :
36
+ - get-versions
37
+ - parse-plugins
38
+ - linux
39
+ runs-on : ubuntu-latest
40
+ steps :
41
+ - uses : actions/github-script@v7
42
+ with :
43
+ script : |
44
+ const fs = require("fs");
45
+ const raw = JSON.parse(fs.readFileSync(".github/plugins.json"));
46
+
47
+ core.summary.addHeading('Build Summary');
48
+
49
+ let table = [
50
+ {data: 'plugin/platform', header: true},
51
+ ];
52
+ let platforms = [];
53
+ Object.entries(raw.platforms).forEach(([key, platform]) => {
54
+ table.push({data: key, header: true});
55
+ platforms.push(platform.asset_tag);
56
+ });
57
+
58
+ let artifacts = [];
59
+ github
60
+ .paginate(github.rest.actions.listWorkflowRunArtifacts, {
61
+ owner: context.repo.owner,
62
+ repo: context.repo.repo,
63
+ run_id: context.runId,
64
+ })
65
+ .then((page) => {
66
+ artifacts.push(...page);
67
+ });
68
+
69
+ Object.keys(raw.plugins).forEach((plugin) => {
70
+ table.push({data: plugin, header: true});
71
+ let filtered = artifacts.filter((artifact) => artifact.name.includes(plugin));
72
+ platforms.forEach((tag) => {
73
+ table.push({
74
+ data: filtered.some((artifact) => artifact.name.includes(tag)) ? ':o:' : ':x:'
75
+ });
76
+ });
77
+ });
78
+
79
+ core.summary.addTable(table);
You can’t perform that action at this time.
0 commit comments