Skip to content

Commit b28c7c6

Browse files
committed
chore: group steps
1 parent 48947fc commit b28c7c6

File tree

1 file changed

+32
-25
lines changed

1 file changed

+32
-25
lines changed

src/monorepo/handleFlarumMonorepo.ts

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { debugLog, log } from '../helper/log';
55
import commitChangesToGit from '../jobs/commitChangesToGit';
66
import runCiJobs from '../runCiJobs';
77
import isDirectoryFlarumExtension from './isDirectoryFlarumExtension';
8+
import * as core from '@actions/core';
89

910
interface IPackageInfo {
1011
name: string;
@@ -79,37 +80,43 @@ export async function handleFlarumMonorepo(): Promise<boolean> {
7980
// Run the CI jobs for each repository in parallel and wait for completion
8081

8182
// First, run the pre-build & build scripts.
82-
await Promise.all(
83-
filteredRepositories.map((repository) =>
84-
runCiJobs(
85-
repository.pathToDir,
86-
{
87-
postBuildChecks: false,
88-
commit: false,
89-
packageName: repository.name
90-
}
83+
await core.group('Pre-build scripts', async () => {
84+
await Promise.all(
85+
filteredRepositories.map((repository) =>
86+
runCiJobs(
87+
repository.pathToDir,
88+
{
89+
postBuildChecks: false,
90+
commit: false,
91+
packageName: repository.name
92+
}
93+
)
9194
)
92-
)
93-
);
95+
);
96+
});
9497

9598
// Then, run the post-build scripts.
96-
await Promise.all(
97-
filteredRepositories.map((repository) =>
98-
runCiJobs(
99-
repository.pathToDir,
100-
{
101-
prepare: false,
102-
preBuildChecks: false,
103-
build: false,
104-
commit: false,
105-
packageName: repository.name
106-
}
99+
await core.group('Post-build scripts', async () => {
100+
await Promise.all(
101+
filteredRepositories.map((repository) =>
102+
runCiJobs(
103+
repository.pathToDir,
104+
{
105+
prepare: false,
106+
preBuildChecks: false,
107+
build: false,
108+
commit: false,
109+
packageName: repository.name
110+
}
111+
)
107112
)
108-
)
109-
);
113+
);
114+
});
110115

111116
// Finally, if all went well, commit the changes to the main branch.
112-
await commitChangesToGit(jetpack.cwd('./'));
117+
await core.group('Commit changes', async () => {
118+
await commitChangesToGit(jetpack.cwd('./'));
119+
});
113120

114121
return true;
115122
}

0 commit comments

Comments
 (0)